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 01:42 PM.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL