Hi everybody,
Hope somebody could help me with this please
I am trying to redesign my main menu and move a vba search box so it sits
outside and above the main navigation menu on the form . The field I am trying to search for, lies
in more than one form which the user can select by selecting a differenty tab on the navigation menu,
eg Customer Name, may be in a Clients Form, Manufaturers Form etc. So I would like
one search box that sits outside and above the naviagtion menu, without having the same
search box within each page. I hope that makes sense
I have tried a simple example below with just one of the forms (CustomerForm) but cant get it to work
Is it possible to do this? any help would be great thanks
it works if the search box is in the 'details' bit of the form with fldNameID eg,
strCriteria = "[fldNameID] = " & Me![Text27]
menun form = frmNavForm
table = tblCustomers
form = frmCustomersForm (selected from tab on menu)
text box = Text27
button = btnFindCustomer
Private Sub btnFindCustomer_Click()
Dim strCriteria As String
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
strCriteria = "tblCustomers![fldNameID] = " & frmNavForm!frmCustomerForm![Text27]
rst.FindFirst strCriteria
Me.Bookmark = rst.Bookmark
End Sub
many thanks for any help
Hope somebody could help me with this please
I am trying to redesign my main menu and move a vba search box so it sits
outside and above the main navigation menu on the form . The field I am trying to search for, lies
in more than one form which the user can select by selecting a differenty tab on the navigation menu,
eg Customer Name, may be in a Clients Form, Manufaturers Form etc. So I would like
one search box that sits outside and above the naviagtion menu, without having the same
search box within each page. I hope that makes sense
I have tried a simple example below with just one of the forms (CustomerForm) but cant get it to work
Is it possible to do this? any help would be great thanks
it works if the search box is in the 'details' bit of the form with fldNameID eg,
strCriteria = "[fldNameID] = " & Me![Text27]
menun form = frmNavForm
table = tblCustomers
form = frmCustomersForm (selected from tab on menu)
text box = Text27
button = btnFindCustomer
Private Sub btnFindCustomer_Click()
Dim strCriteria As String
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
strCriteria = "tblCustomers![fldNameID] = " & frmNavForm!frmCustomerForm![Text27]
rst.FindFirst strCriteria
Me.Bookmark = rst.Bookmark
End Sub
many thanks for any help