how to update a textbox with reference to input from another textbox?

T

tealeaf

lets say i have 2 tables(tblBooksOut and tblPubList)
tblBooksOut has 2 fields(Publabel and Ic)
tblPubList has 2 fields(Publabel and Pubtitle)

in a form(frmBookingOut), i have a textbox that user
inputs Publabel into tblBooksOut.

upon input of Publabel, a textbox immediately displays
Pubtitle from tblPublist corresponding to the user's input
of Publabel into tblBooksOut.

my problem here is that im not able to get the Pubtitle to
be displayed immediately, i have to exit the form, and
then come back in to see it displayed.
 
N

Nikos Yannacopoulos

The general answer is: use a macro (or code) fired by the After Update event
of the Publabel input control to Requery the tesxtbox that dispalys
Pubtitle.
I said "general" because that will work with different ways to display
Pubtitle: DLookup; SetValue in a macro etc. Your post implies you already
have something there to do it.

HTH,
Nikos
 
G

Guest

im a beginner in access and have almost no knowledge of
code. from your suggestion, i tried out requery, currently
i just put 'me.requery' into the afterupdate event of the
publabel input control. which isnt working correctly as
the whole form is reset to the 1st record.

with reference to my original post, what is the code to
put in the afterupdate event of the publabel input control?
or what is the code to requery and reference pubtitle with
respect to user input publabel without re-querying the
whole form?

many thanks.
 
T

tealeaf

anybody can help?
-----Original Message-----
im a beginner in access and have almost no knowledge of
code. from your suggestion, i tried out requery, currently
i just put 'me.requery' into the afterupdate event of the
publabel input control. which isnt working correctly as
the whole form is reset to the 1st record.

with reference to my original post, what is the code to
put in the afterupdate event of the publabel input control?
or what is the code to requery and reference pubtitle with
respect to user input publabel without re-querying the
whole form?

many thanks.
the
After Update event Pubtitle
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top