I want to go to a record by double clicking a field with that record in it.
I have a form which has a self join on it called 'Link'. This is a combo box
field that contains a drop down box of the other events in that table. When
events are linked, it is selected by the user. I would like to be able to
double click the box and the form take you to that record.
I have the following code:
Private Sub Linked_Event_DblClick(Cancel As Integer)
Dim strEvent As Integer
strEvent = [Linked Event]
Debug.Print strEvent
DoCmd.FindRecord ([Event Number] = strEvent)
End Sub
The debug.print shows the correct event but the form points to the previous
record rather than the record contained within the field.
Thanks
Look at this link on "Using a Microsoft Access Combo Box to Search for a
Record"
http://www.databasedev.co.uk/combo_box_search.html

Signature
Good Luck
BS"D
> I want to go to a record by double clicking a field with that record in it.
>
[quoted text clipped - 16 lines]
>
> Thanks
rjw24 - 16 Jul 2007 17:00 GMT
Thanks for the link...however, I followed the procedure as suggested but the
same is still happening. The form does not change record. My code is as
follows:
Private Sub Linked_Event_DblClick(Cancel As Integer)
DoCmd.ShowAllRecords
Me![Linked Event].SetFocus
DoCmd.FindRecord Me![Linked Event]
End Sub
I have taken out the last part as I do not want the combo box to be cleared
once I double click. Maybe it is because the combo box is a record in the
table?
> Look at this link on "Using a Microsoft Access Combo Box to Search for a
> Record"
[quoted text clipped - 21 lines]
> >
> > Thanks