change record number in record bar via vba

jpl458

Well-known member
Local time
Today, 14:25
Joined
Mar 30, 2012
Messages
1,181
I have a listbox that displays the results of a query. The first field in the listbox row is ID, which is the primary key for the record in the listbox. Is there a way to double click a row in the listbox and have the ID of that row entered into the record number in the records bar at the bottom of the screen, causing that record to be displayed in existing columnar display for records.
 
Check out the FindFirst method and Bookmark property.
 
Here is a "quick and dirty" tip. There is a combo box option to make the selected record become the form's current record. If you build such a combo box, you can easily copy the code it generates. Or you can just use the combo box. But the point is, you can see the code that Access uses to navigate to a specific record and just copy & adapt it where you need it.
 
Here is a "quick and dirty" tip. There is a combo box option to make the selected record become the form's current record. If you build such a combo box, you can easily copy the code it generates. Or you can just use the combo box. But the point is, you can see the code that Access uses to navigate to a specific record and just copy & adapt it where you need it.
I came back to this just now, and I can't find where the option is to make the selected record become the forms current record. Plus, how/where do you read the code that Access uses to navigate to a specific record.

Thanks
 
I came back to this just now, and I can't find where the option is to make the selected record become the forms current record. Plus, how/where do you read the code that Access uses to navigate to a specific record.

Thanks
Did you happen to research the terms I mentioned? Just curious...
 
Yes. Just wanted to know how to read code thats behind a combobox.
It depends, some Wizards will create VBA code, but sometimes it creates a macro. In any event, you read it by going to the AfterUpdate event of the Combobox.
 
It depends, some Wizards will create VBA code, but sometimes it creates a macro. In any event, you read it by going to the AfterUpdate event of the Combobox.
Thanks. But still can't find the option that Doc references . He wrote "There is a combo box option to make the selected record become the form's current record." Is that a property? I can't find it.
 
Thanks. But still can't find the option that Doc references . He wrote "There is a combo box option to make the selected record become the form's current record." Is that a property? I can't find it.
It's a Wizard. Try going to your form's design view and add an unbound Combobox. When the wizard asks you, pick the third option.
 
Every now and then I have to check myself for bite marks. It happens with all of us at different times.
 

Users who are viewing this thread

Back
Top Bottom