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!

updating table and requerying

Status
Not open for further replies.

jaydy

MIS
Nov 9, 2003
27
PH
hi guys,

i have this crazy problem about automatically updating my table and my listbox. i have this form, which contains textboxes that are all bound to fields of a table. on this form i have a listbox control. the listbox is bound to that same table also. what i want to happen is, after entering data in the textboxes, i click on a button that would make the some of the data i entered display on the listbox. i can easily display on the listbox..i just used the requery method.

the problem is, when i enter a new record and i'm done with all the textboxes, and then when i click on my button for the data to be displayed on the listbox, nothing happens. i think it's because the new record that i just entered hasnt been updated in the table yet, such that when i requery, nothing happens. i always have to click on other entries/records in my listbox first before my requery/display button works.

how do i make my requery button work immediately after entering data on the form, without having to click on something else? since my textboxes are bound to a table, isn't the data that i enter supposed to be automatically be appended to that table as i type?

help pls, thanks!
 
Have you tried to requery the listbox in the form's AfterUpdate event procedure ?

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
well, i figured out the answer a couple of minutes after i posted the question hehe...i simply put me.refresh before requerying the listbox and it worked! thanks though. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top