accessing query fields (1 Viewer)

ltiner

New member
Local time
Yesterday, 23:26
Joined
Jun 13, 2002
Messages
9
I have a form that uses a query for the record source.

On this form I have a subform.

Within the subform I need to use some of the main form query fields (there is no reason to display these fields on the main form)to perform various calculations. I know I can have bound text boxes (referencing the needed fields) on the main form and reference them through the main form. But, is there an easy way to reference the query fields without having to place them on a form?

Thanks

Larry
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:26
Joined
Feb 19, 2002
Messages
43,466
Try referencing the fields this way:

Me.Parent.yourfieldname

If that doesn't work (I don't know if it will since I haven't tried it), either put the fields into hidden controls on the main form or change the subform's query to join to the table that the mainform's query references so that the fields will be available in the subform's recordsource.
 

Users who are viewing this thread

Top Bottom