Hi,
I've got form "FrmMain" with 2 tabs, "Tab1" and "Tab2"
Tab1 contains customer-data "frmCust" and Tab2 "frmSrch" ist used for searches.
The form on Tab2 contains a field for searches which displays in a all matching entries in a list box (with several columns - ID, First Name, Surname). So far this works fine.
What i want is to jump to the appropiate entry of my customer on Tab1 by doubleclicking an entry in the list box on Tab2.
The code is:
The message i get is "The current record contains no field named 0001" (or similar, as it's not an english access), 0001 is the first record of the table Customers. ID is formated as text in the customer table.
It's very likely that it's just a simple setting as i'm a beginner for VBA, but neither the online help gives me the right clue nor "The access bible". So any help is very appreciated. Thanks in advance.
I've got form "FrmMain" with 2 tabs, "Tab1" and "Tab2"
Tab1 contains customer-data "frmCust" and Tab2 "frmSrch" ist used for searches.
The form on Tab2 contains a field for searches which displays in a all matching entries in a list box (with several columns - ID, First Name, Surname). So far this works fine.
What i want is to jump to the appropiate entry of my customer on Tab1 by doubleclicking an entry in the list box on Tab2.
The code is:
Code:
Private Sub ResultCustSrch_DblClick(Cancel As Integer)
DoCmd.GoToControl Forms![FrmMain]![frmCust]![ID]
DoCmd.Requery "ID"
DoCmd.FindRecord ID, acEntire, False, , False, acCurrent, True
End Sub
It's very likely that it's just a simple setting as i'm a beginner for VBA, but neither the online help gives me the right clue nor "The access bible". So any help is very appreciated. Thanks in advance.