Coding for F9 Refresh of list box?

  • Thread starter Thread starter csteuer
  • Start date Start date
C

csteuer

I have an unbound list box on my home page that lists all the records in
the database - double click on a record and it opens up the details in
another form and closes the home page form.

After I add a new record using the details page, then close the details
page and open up the home page, the new record does not appear in the
listbox. However, if I hit the F9 key it appears.

How can I add some code to refresh/requery the list box with the new
record?

I've tried me.requery and me!listbox.requery on the load event but
neither work.

Interestingly enough, if I edit a record, the new value appears in the
list box without hitting F9.
 
You could requery the listbox in the On Close event of the details form
... or ... requery the lstbox using the On Got Focus event of the
listbox ...

RDH
 
It appears the the data in the deails form is not save to the bale whe
the combo is requeried ...

Add a line in the "detail form" that executes before the requery of th
combo ...

Me.Dirty = False

The above will force a save of the added data ...

RD
 
Back
Top