By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,183 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Afterupdate for textbox?

P: n/a
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

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Try the BeforeUpdate event instead

Nov 13 '05 #2

P: n/a
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.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.