How do I set an unbound forms filter on open

crich21

Registered User.
Local time
Yesterday, 19:38
Joined
Jan 10, 2003
Messages
97
I have an unbound form that I use a combo box to filter records. When the form is opened it shows all records and the combobox is empty. Can I set the value on of the combobox to the first item in the list and filter it on open.
 
If the RowSource is set up correctly you can use in the OnOpen or OnLoad Event of the form something like
Code:
Me!YourCombo = Me!YourCombo.ItemData(0)
This will select the first item in a List/Combobox. After that you have manually call the AfterUpdate Event procedure because the event isn't triggered by the previous form of selecting an item.
 
Thank you Nouba
this works perfect:)
 

Users who are viewing this thread

Back
Top Bottom