Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / July 2007

Tip: Looking for answers? Try searching our database.

Go to Record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rjw24 - 16 Jul 2007 15:20 GMT
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
Ofer Cohen - 16 Jul 2007 16:04 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.