Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call query after update

Status
Not open for further replies.

lauraSatellite

Technical User
Jul 22, 2004
35
IE
I have a Primary Key drop down list which has a query as its source. Currently when i insert a new record, i have to close out of the form, and re-enter it to have an up-to-date drop down list.
I need the drop down list to "refresh" or call its source query again after the update occurs.
I have tried this:

Private Sub Form_AfterUpdate()
Me.RecordSource = Me.SourceQuery.QueryField
End Sub

I am new to procedures, if you have any useful tips they would be very much appreciated.
 
Have you tried this ?
Private Sub Form_AfterInsert()
Me![name of combo].Requery
End Sub

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You've got the right event procedure.

Put:
me.cbocomboname.requery

where cbocomboname is the name of your combo box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top