Parameter help please

gguy

Registered User.
Local time
Today, 02:37
Joined
Jun 27, 2002
Messages
104
I want to run a query automatically in the gotfocus event of a field within a form.
Prior to the gotfocus, a value is entered in an unbound text box on the form and I want to use that value for the maximum value in the parameters. I will set the minimum to zero.

My code errors in the where, it has no problem with the serial number but I can't seem to set the deliv_no to pull the value entered on the form.

SELECT Sum(VOLTEST.unc_del) AS SumOfunc_del
FROM VOLTEST
WHERE (((VOLTEST.SERIAL_NO)=[Forms]![largeVolume1]![serial]) AND ((VOLTEST.DELIV_NO)>0 And (VOLTEST.DELIV_NO)<=([Forms![largeVolume1]![No_del])));

I figure this is a syntax problem. Can you guys see where I have gone wrong?

I need the value to write to the table, not the form when this runs.

Thanks, GG
 
Okay, I figured out what is wrong with the query

But now when it executes in the gotfocus event it comes up on the screen in the datasheet view.

I need it to write the value determined by the query in a field on the form or directly to the table.

Thanks, GG
 

Users who are viewing this thread

Back
Top Bottom