By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

References to objects in Reports / Sub Reports

P: n/a
Dear reader,

The syntax to refer to an object in a Form is:

Forms![MasterForm...]![SubForm....].[FieldName....]

But how is this syntax in Reports and specially from a sub report to the
master report (mother).

Thanks for any help.

Kind regards,

Simon
Sep 24 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Simon" <Sv********@Versatel.nlwrote in message
<45***********************@news.tele2.nl>:
Dear reader,

The syntax to refer to an object in a Form is:

Forms![MasterForm...]![SubForm....].[FieldName....]

But how is this syntax in Reports and specially from a sub report to
the master report (mother).

Thanks for any help.

Kind regards,

Simon
Or

Forms![MasterForm...]![SubForm....].Form![ControlName....]
Reports![MasterReport...]![SubReport....].Report![ControlName....]

which is/should be the same for both forms and reports. The "mother"
of a subform or subreport, is the "Parent", so, in code, you can use
something like

Me.Parent.Form!txtControl ' for forms, or
Me.Parent.Report!txtControl ' for reports, or
Me.Parent!txtControl

Here are two references
http://support.microsoft.com/?kbid=209099
http://www.mvps.org/access/forms/frm0031.htm

--
Roy-Vidar
Sep 24 '06 #2

P: n/a


"RoyVidar" <ro*************@yahoo.noschreef in bericht
news:mn***********************@yahoo.no...
"Simon" <Sv********@Versatel.nlwrote in message
<45***********************@news.tele2.nl>:
Dear reader,

The syntax to refer to an object in a Form is:

Forms![MasterForm...]![SubForm....].[FieldName....]

But how is this syntax in Reports and specially from a sub report to
the master report (mother).

Thanks for any help.

Kind regards,

Simon

Or

Forms![MasterForm...]![SubForm....].Form![ControlName....]
Reports![MasterReport...]![SubReport....].Report![ControlName....]

which is/should be the same for both forms and reports. The "mother"
of a subform or subreport, is the "Parent", so, in code, you can use
something like

Me.Parent.Form!txtControl ' for forms, or
Me.Parent.Report!txtControl ' for reports, or
Me.Parent!txtControl

Here are two references
http://support.microsoft.com/?kbid=209099
http://www.mvps.org/access/forms/frm0031.htm

--
Roy-Vidar
This syntax is correct but in my case for Reports:
............!ReportName....... visible = True
and
............!ReportName....... visible = False
It works

But for Fields it do not work.
The code gives not an error but the field is in all cases visible.

Simon

Sep 24 '06 #3

P: n/a
"Simon" <Sv********@Versatel.nlwrote in message
<45***********************@news.tele2.nl>:
>
"RoyVidar" <ro*************@yahoo.noschreef in bericht
news:mn***********************@yahoo.no...
>"Simon" <Sv********@Versatel.nlwrote in message
<45***********************@news.tele2.nl>:
>>Dear reader,

The syntax to refer to an object in a Form is:

Forms![MasterForm...]![SubForm....].[FieldName....]

But how is this syntax in Reports and specially from a sub report
to the master report (mother).

Thanks for any help.

Kind regards,

Simon

Or

Forms![MasterForm...]![SubForm....].Form![ControlName....]
Reports![MasterReport...]![SubReport....].Report![ControlName....]

which is/should be the same for both forms and reports. The "mother"
of a subform or subreport, is the "Parent", so, in code, you can use
something like

Me.Parent.Form!txtControl ' for forms, or
Me.Parent.Report!txtControl ' for reports, or
Me.Parent!txtControl

Here are two references
http://support.microsoft.com/?kbid=209099
http://www.mvps.org/access/forms/frm0031.htm

--
Roy-Vidar
This syntax is correct but in my case for Reports:
...........!ReportName....... visible = True
and
...........!ReportName....... visible = False
It works

But for Fields it do not work.
The code gives not an error but the field is in all cases visible.

Simon
Sorry, i don't understand what the problem is, neither do I
understand what syntax you are actually using.

You may try to wait and see if anyone else understand, or try posting
the actual error (error number/message) and the exact syntax you are
using, and where (from which form/report/subform/subreport) whether
it is in code (which event) or an expression, and what it is you
wish to achieve.

--
Roy-Vidar
Sep 24 '06 #4

P: n/a

"RoyVidar" <ro*************@yahoo.noschreef in bericht
news:mn***********************@yahoo.no...
"Simon" <Sv********@Versatel.nlwrote in message
<45***********************@news.tele2.nl>:

"RoyVidar" <ro*************@yahoo.noschreef in bericht
news:mn***********************@yahoo.no...
"Simon" <Sv********@Versatel.nlwrote in message
<45***********************@news.tele2.nl>:
Dear reader,

The syntax to refer to an object in a Form is:

Forms![MasterForm...]![SubForm....].[FieldName....]

But how is this syntax in Reports and specially from a sub report
to the master report (mother).

Thanks for any help.

Kind regards,

Simon

Or

Forms![MasterForm...]![SubForm....].Form![ControlName....]
Reports![MasterReport...]![SubReport....].Report![ControlName....]

which is/should be the same for both forms and reports. The "mother"
of a subform or subreport, is the "Parent", so, in code, you can use
something like

Me.Parent.Form!txtControl ' for forms, or
Me.Parent.Report!txtControl ' for reports, or
Me.Parent!txtControl

Here are two references
http://support.microsoft.com/?kbid=209099
http://www.mvps.org/access/forms/frm0031.htm

--
Roy-Vidar
This syntax is correct but in my case for Reports:
...........!ReportName....... visible = True
and
...........!ReportName....... visible = False
It works

But for Fields it do not work.
The code gives not an error but the field is in all cases visible.

Simon

Sorry, i don't understand what the problem is, neither do I
understand what syntax you are actually using.

You may try to wait and see if anyone else understand, or try posting
the actual error (error number/message) and the exact syntax you are
using, and where (from which form/report/subform/subreport) whether
it is in code (which event) or an expression, and what it is you
wish to achieve.

--
Roy-Vidar

The code is very easy:

Report!MasterReportName.......!SubReportName...... ...Visible = False

Works
And
Report!MasterReportName.......!FieldName.........V isible = False

Does not work but it gives not an error mesage.

Simon
Sep 24 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.