Connecting Tech Pros Worldwide Help | Site Map

Afterupdate for textbox?

anthony
Guest
 
Posts: n/a
#1: Nov 13 '05
I have the following query that should update my textbox called
as40narr. I tried the dlookup function but it does not update the
field in the table. I use the following code in a query to get the
information after the user has selected all three combo boxes. I do
not know the syntax or where I would put the afterupdate to fill the
textbox in display the text on the form and insert into the table.
Following is the code used

SELECT OBJP1.ODOBTX
FROM OBJP1
WHERE (((OBJP1.ODLBNM)=[Forms]![Object]![cboODLBNM]) AND
((OBJP1.ODOBNM)=[Forms]![Object]![cboODOBNM]));
I need to display the ODOBTX and also insert into field called
as400narr.

Please help
thank you

dedejavu@hotmail.com
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Afterupdate for textbox?


Try the BeforeUpdate event instead

Hansen
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Afterupdate for textbox?


First off all, use VBA (AfterUpdate event for the last combobox) and
try:

SELECT *
FROM OBJP1
WHERE OBJP1.ODLBNM = " & (cboODLBNM.value) & " AND
OBJP1.ODOBNM = " & (cboODOBNM.value) & ";

The bound column of the comboboxes should refer to a identifiable
number that you can reference in OBJP1.

After selecting the data from your datase, check if the record exists
and then with the recordset make a textbox on the form the same value
as ODOBTX and then update as400narr from the textbox.
Closed Thread