Requery a Control

  • Thread starter Thread starter Clyde Ellingwood
  • Start date Start date
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
 
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
 
Back
Top