Reference Controls

B

brian

I am having problem referencing controls from forms and
reports. Can somone explain when to use a period and
when to use a exclamation point. My main problem is that
I am trying to reference a check box from a form and a
subreport from a report.

I have a subreport named SubQuote
Report named RptQuote
Price is the column I want to reference

I am using the following to reference:
Reports!rptquote.Report!SubQuote.Report!Price.Visible =
False

I get an error saying 'you entred an expression that has
an invalid reference to the property Form/Report"

Also on this report I am trying to use an IF statment
checking the value on a form. I get the same error.

REPORT: RptQuote
FORM: zzzzzz
Column: chkPricing

I am using form!zzzzzz!chkPricing

Can someone please guide me!

Thanks
 
M

Marshall Barton

brian said:
I am having problem referencing controls from forms and
reports. Can somone explain when to use a period and
when to use a exclamation point. My main problem is that
I am trying to reference a check box from a form and a
subreport from a report.

I have a subreport named SubQuote
Report named RptQuote
Price is the column I want to reference

I am using the following to reference:
Reports!rptquote.Report!SubQuote.Report!Price.Visible =
False

I get an error saying 'you entred an expression that has
an invalid reference to the property Form/Report"

That should be:
Reports!rptquote!SubQuote.Report!Price.Visible = False

Since the second and third ! are used to reference controls,
they could be periods if you prefer.


Also on this report I am trying to use an IF statment
checking the value on a form. I get the same error.

REPORT: RptQuote
FORM: zzzzzz
Column: chkPricing

I am using form!zzzzzz!chkPricing

You need to go through the Forms collection (the Form
property is inappropriate here):

Forms!zzzzzz!chkPricing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top