I am a new learner in Access 2003 and have found myself stuck on a very simple act. I am trying to find records in a datasheet which is a subform (subfrmCompaniesList) of the form (frmCompaniesList). A command button open on the form (frmCompaniesList) OpenForm "frmFindCompany" where you enter the company to find.
This work interms of finding the record but I don't know how to move the bookmark (record pointer) in the subform (subfrmCompaniesList).
Private Sub cmdFind_Click()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Name] Like '" & Me![txtCoName] & "*'"
If rs.NoMatch Then
MsgBox Me![txtCoName] & " not found"
Me.Bookmark = rs.Bookmark
I am basically trying to achive a similar effect you get with this!!Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Last edited by LeKool; 01-31-2006 at 12:42 PM.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center