Link to home
Start Free TrialLog in
Avatar of Shooter54
Shooter54

asked on

getting value for a report from a form based on current form

I have an unbound control or field on a report that I would like to get the contents from an active and open form. Using the following syntax doesn't seem to work for me:

=[Forms]![frmCCOrder]![frmCCFormLineItems].[txtProject]

frmCCOrder is the name of my main form, frmCCFormLineItems is the name of my subform where my control lies, and txtProject is the name of the control from which I want to retrieve my data.

All I get when I preview the form using this is ?Name.

Any idea what I may be doing wrong?
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shooter54
Shooter54

ASKER

Thanks! Quick fix to what should have been a simple issue.
=[Forms]![frmCCOrder]![frmCCFormLineItems].[Form].[txtProject]
instead of
=[Forms]![frmCCOrder]![frmCCFormLineItems].[txtProject]
Speedy response, saved the day! Thanks again.
I don't Think it will be possible to do that if the control is in details or group section of the report,
you can use global or public variable to hold the required value when report shown and access that variable