Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 10:19 AM
anthony
Guest
 
Posts: n/a
Default Afterupdate for textbox?

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

  #2  
Old November 13th, 2005, 10:21 AM
dedejavu@hotmail.com
Guest
 
Posts: n/a
Default Re: Afterupdate for textbox?

Try the BeforeUpdate event instead

  #3  
Old November 13th, 2005, 10:21 AM
Hansen
Guest
 
Posts: n/a
Default 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.
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles