access web page

brettvba

MrExcel MVP
Joined
Feb 18, 2002
Messages
1,030
I have created a web page in access, at the moment it has all the fields from the database in it and you can navigate between each record using the toolbar at the bottom on the page.

I have put a combobox in at the top so that you can select the record that you want to look at by name, I have the name and the id in the combo box, how can I link the combobox to the rest of the page so that when the combobox changes it finds the id key and the rest of the page changes to the combobox selection?

I hope that explains well enough if you need more info post back.

Thanks
Brett :rolleyes:



EDIT: Ok I have fixed this problem now. :cool:
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi brettvba,

If I follow your question, you want a page to retrieve records based on the value selected in a combo box. Instead of having this page (I assume this works like a form) refering to a table in its unfiltered form, have it look to a query with all the fields from the table to which it currently refers.

Now in the criteria field for the ID field of this query, right-click and select build, and see if you can go find the combobox control that you want to have determining what records are displayed on the form. Double click on it and Access should add the controls 'address' to the criteria field of the id field of this query.

Now, you will need some code as such to keep everything 'fresh':

Code:
combobox1_afterupdate()

If Not Isnull(combobox1) Then
    If Me.Dirty then Me.Dirty = False
End if

Me.Requery

End Sub

edit: Okay, you have fixed the problem now!

HTH,
 
Upvote 0
Thanks Cort but I worked it out by setting the combobox to a filter which fixed the problem.

Cheers

Brett
 
Upvote 0

Forum statistics

Threads
1,221,519
Messages
6,160,295
Members
451,636
Latest member
ddweller151

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top