Subforms Accessing Values

keybs

Registered User.
Local time
Today, 00:34
Joined
Aug 16, 2001
Messages
12
Here is my problem:
I have an update query that updates a table based on a value in a text box that is in a sub-form. The info is not successfully going from the subform to the "update to" part of the Query . I get prompted to enter the query search criteria since the value is not successfully passed to the query. I know that a subform is a control and I am almost certain that I am using the right syntax in the "Update to" field:
forms!formname!subformname.form!subformfieldname

Please help!

[This message has been edited by keybs (edited 08-16-2001).]

[This message has been edited by keybs (edited 08-16-2001).]

[This message has been edited by keybs (edited 08-16-2001).]
 
I guess I have a habit of going whatever route to get the job done, so my reply may be the long way around.

I would try creating a "dummy" control on the form, not visiable. I would then use the SetValue command and use the "dummy control" value as my criteria in the query.

Might be a long way around, but it might work.
 
Got it to work now... Thanks so much for your help!!
 
A tip on how to ensure the syntax is correct is to have the form you want to reference open, open the query and right click in the criteria row, choose build and use the expression builder to successfully reference the field without mistakes.

Ian
 

Users who are viewing this thread

Back
Top Bottom