Combo Update Table and Refresh Form

mikebaldam

Registered User.
Local time
Today, 09:42
Joined
Oct 29, 2002
Messages
114
On my form...

I have a combo linked to Table A

On 'Not in List' creates a popup to edit Table A .

Is there an easy way of automatically updating the combo box or refreshing the forms data (so that the combo is refreshed also)?


Many thanks


Mike
________
TX311M
 
Last edited:
Add this code to the Pop-up form's Close event:

Form_Form1.Combo1.requery

Obviously substitute the Form1 and Combo1 for the names given in your database.
 
I have the following lines in my pop-up form code:

With Forms!frmName.FieldName
   .Undo
   .Requery
   .Value = Me.NewValue
End With


The ".Undo" removes whatever you originally typed into the field that triggered the NotInList Event. The ".Requery", as pointed out by sstreet, requeries the combo box, and is all that you really need. The next line sets the value of the field in the orignal form equal to the value that you've just created for the new record in your pop-up form.
 

Users who are viewing this thread

Back
Top Bottom