473,386 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

Nov 13 '05 #1
2 2597
Try the BeforeUpdate event instead

Nov 13 '05 #2
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance, it is GREATLY appreciated. I was wondering if there is a way to tell Access 97 to compare the first line with other textboxes using the...
3
by: jdph40 | last post by:
In Access 2002, I designed a simple database for our Safety department to enter results of a survey. There are 41 true/false statements. I have a main form called frmSurvey with a subform called...
2
by: jv | last post by:
Hello, I have a Service Cancellation form that contain a CancelDate text box. The text box has an AfterUpdate event that perform a few calculations. This works fine. However, next to the text...
3
by: gazelle04 | last post by:
Which happens first AfterUpdate event of a form or Clicked event of a button on a form. I have these codes on an AfterUpdate of a form: If UpdateDone = True Then ...
5
by: EManning | last post by:
I'm developing an unbound form with a series of questions on it. Each question is either a text box or an option group. I have coding in the AfterUpdate event of each control to highlight the...
7
by: technocraze | last post by:
Hi guys, I encountered this error while using the AfterUpdate event for my listbox. Error: Update or CancelUpdate without using AddNew or Edit. What i wanted to achieve is just to display the...
1
imrosie
by: imrosie | last post by:
Please help with this one,,,,,I've been trying everything in my arsenal to fix this one. I'm stumped.... I"ve got a unbound combo box (customername) that has two events (on click); AfterUpdate and...
4
by: bcallnan | last post by:
Hello All- I am trying to reference a subform's afterupdate event that is 3 deep and am having some trouble getting it to work. The control is a combo box and i cannot seem to trigger the...
12
by: Gerhard | last post by:
This is bizarre... Im having problems with the combobox AfterUpdate event: Im running Access 2003. I created an unbound combobox with 3 columns on a form. The Row Source is from a table....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.