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

lsitbox requery problem

Status
Not open for further replies.

JimmyRa

Programmer
Nov 20, 2003
4
GB
I have a form based on an 'Events' table, with a (not enabled) list box displaying 'staff involved'. The rowsource is a query, which calls a VB function to get the current EventID, which is the key to both tables. There is an unbound textbox which can be used to add a staff member, using an SQL INSERT, with the EventID, and the StaffCode. This then does a requery, and the list box is updated.
Fine - looks good, and works well.
But if I go in to add a NEW event, the EventID is created, and then add Staff, the requery has no effect. The code is called, the proper EventID is sent, but the listbox remains empty! If you go off the screen, and check, all records have been added OK.

Any ideas, Please, anyone ?
 
It might help if you try Refresh instead of Requery when you add a new event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top