-
1
- #1
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.
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.