pre-select new record in combo box

G

Guest

Hi,
I have a form (frmActivity) with a combo box (cboStore) that gets its data
from a table (Store). If there is a new store which dose not show in the
combo box I have a command button on the same form that open a popup window
for entering the name of the new store. In the 'on close' event of the popup
I requeary the combo box (cboStore) on the main form so that the new store
will appear.

What I would really like is to have the new store already selected in the
combo box when the popup is closed. Is this possible and if so how?
Thanks,
Phil
 
G

Guest

Try after the requery of the combo box to write the code

Forms![frmActivity]![cboStore] = Me.[FieldName]

Me.[FieldName] - is the name of the text box within the pop up form that
indicate the new record
 

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