Hi there
I have a form that I have set up containing 2 pages (tabs) that cover the whole form.
When the form loads it opens pgeBookingDetails. PgeStart contains a listbox that is sourced by a query.
What I am trying to do is double click on the selected record within in the listbox and have code open up the 2nd page and display the records details.
The listbox has 5 columns. The 1st column displays tje primary key from the query(this is what I wish to use as a reference)
How can I have a double click event open the 2nd page and goto to my wanted record.
This is the code I have tried but it doesn't work.
Does anyone have any suggestions?
I have a form that I have set up containing 2 pages (tabs) that cover the whole form.
When the form loads it opens pgeBookingDetails. PgeStart contains a listbox that is sourced by a query.
What I am trying to do is double click on the selected record within in the listbox and have code open up the 2nd page and display the records details.
The listbox has 5 columns. The 1st column displays tje primary key from the query(this is what I wish to use as a reference)
How can I have a double click event open the 2nd page and goto to my wanted record.
This is the code I have tried but it doesn't work.
Code:
Private Sub lstBookings_DblClick(Cancel As Integer)
Dim result As String
DoCmd.GoToControl ("pgeBookingDetails")
result = Me.lstBookings.Column(0)
DoCmd.GoToRecord , , acGoTo, result
End Sub
Does anyone have any suggestions?