Referencing fields on a subform

RevJeff

Registered User.
Local time
Today, 04:12
Joined
Sep 18, 2002
Messages
129
Hi,

I am trying to pull data in a subform to my report and all I am getting is "#Name?". I have no problems pulling the same fields from a main form.

I have tried it several different way.

=([Forms]![MainForm]![SubForm]![Field])
=([Forms]![MainForm]![SubForm].[Field])
=([Forms]![MainForm]![SubForm].[Form].[Field])
=([Forms]![MainForm]![SubForm].[Form]![Field])
=([Forms]![MainForm]![SubForm]![Form]![Field])
=([Forms]![MainForm]![SubForm]![Form].[Field])

Can someone please tell me what I am doing wrong. I just recently moved to Access 2010 from 2003. Is there a different way of doing things?

Thanks
Jeff
 
I'm not sure I totally follow you, but a report needs to get its data from a query or table. You can use a form to filter the query or table before the report opens. Is that what you are trying to do with the form?
 
You can use the builder to get your correct syntax because it does matter what the control that houses the subform on the main form is and you reference that control and not your subform within the control.

See here for a quick way to get the right syntax.
 

Users who are viewing this thread

Back
Top Bottom