Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find Record & Match 1

Status
Not open for further replies.

gallas

Technical User
Feb 5, 2002
55
GB
I',m sure it's a very easy question but I'm just starting with VBA. My code is as follows:

Dim stCompanyLinkVal As String
Dim stEventLinkVal As String
stCompanyLinkVal = "[CompanyID]=" & Me![CompanyID]
stEventLinkVal = "[ContactLogId]=" & Me![ContactLogID]
Forms!CompaniesForm.SetFocus
Forms!CompaniesForm.Requery
DoCmd.Restore

Need code to Find the record that matches the stCompanyLinkVal

Forms!CompaniesForm!ContactLogSubform.SetFocus
Forms!CompaniesForm!ContactLogSubform.Requery

Need code to Find the record on the subform that matches the stContactLogID


Does anyone know what code I need to find the record on companies form and bring it into focus? Basically the form that the above is launched from is a set of reminders for that user. The button launching the code should take the user to the relevant company on the main form without losing the rest of the records returned by CompaniesForm.

Tks.G.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top