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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query after operation 1

Status
Not open for further replies.

Xenocide

Programmer
Jan 20, 2005
76
CA
I have a listbox linking to a certain query.

I would like it to refresh after I add some information in my databse without having to close the forms or something like that

I tried something like that

Private Sub Form_AfterInsert()
Me.lst3.Requery
End Sub

but it doesn't work can someone help me please?
thanks you
 
The after insert event of the form fires after a new record is inserted. Perhaps try the on current event (the after update event could also be an option, but I'd favour the on current)?

Roy-Vidar
 
thanks for the help but it doesn't work either.. the list doesn't update after the table have been updated
 
And this ?
Me!lst3.RowSource = Me!lst3.RowSource

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
How do you update the table? If it's done in code, add the requery, or PHV' suggestion at the end of that code.

Roy-Vidar
 
Thanks a lot guys

PHV suggestion worked really well althoght since I'm directly in the forms I don't need the ! but . instead :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top