Refreshing a forms search list

J

jkoca

I have a form which has a combo box in the header used to search existing
records and the bound fields in the body. When the form is loaded, the combo
box row source is an embedded SQL statement selecting the id and description
ordered by description.

My problem is when I change values in existing records or I insert new
records in the table, the contents of the search combo box remains as it was
when the form loaded.

My questions are:

1. How do I get this to refresh with new values ?
2. What event do I need to tie this code to ?

Thanks,

Jim Koca
 
M

Marshall Barton

jkoca said:
I have a form which has a combo box in the header used to search existing
records and the bound fields in the body. When the form is loaded, the combo
box row source is an embedded SQL statement selecting the id and description
ordered by description.

My problem is when I change values in existing records or I insert new
records in the table, the contents of the search combo box remains as it was
when the form loaded.

My questions are:

1. How do I get this to refresh with new values ?
2. What event do I need to tie this code to ?

Use Me.comboboxname.Requery

in the ***form's*** AfterUpdate event procedure.
 

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