MS Access Query and expression builder

ripsrv10
ripsrv10 used Ask the Experts™
on
I am trying run a query and in my query one of criteria fields is setup to select data from another form.  So I enter a serial number into a form and then I run the query on event update.  In the query I am using the expression to insert the serial field from the form but I does not work.  My query works because I can hard code the serial number into the field and it returns back data?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Try using this syntax for getting criteria from a control on a form.
-Chuck
    Forms![frmMyForm]![txtMyControl]

Open in new window

Top Expert 2009
Commented:
It can be helpful to save the value from the textbox to a variable, and display it in the Immediate Window using a Debug.Print statement.
Top Expert 2006
Commented:
1) I enter a serial number into a form
Unbound Textbox on a form? If not, then you need to commit the record where you're entering the data

2) I run the query on event update
This query runs to insert a new record into a table using the serial number that you just typed as a non-Autonumber field correct?

3) In the query I am using the expression to insert the serial field from the form
The syntax for the criteria is as Chuck has supplied correct?

If all this is true, can you show us the Query?

J

Author

Commented:
1

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial