Requery a Control

C

Clyde Ellingwood

My application has a main form with no table or query as
the record source. It does have combo box with a table as
the record source with the default value being the first
record. There is an option on a custom menu to add or
delete records from the source table for the combo box.
When I close this form I requery the control on the main
form but if the user is on the record deleted the combo
box is "blank" or if the user is on another record that
record is displayed.I would like to have it display the
first record in the table after the requery.

Thanks....Clyde
 
G

Guest

Hi Clyde,

Try this, in the After Update Event of when you delete the record

cmboBoxName.Requery
cmboBoxName = cmboBoxName.ItemData(0)

I hope this helps,
Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top