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

Printing report of subform data

P: n/a
Hi!

I have a subform (ShedTableSubForm) at the bottom of my MAIN form. I would
like to do two things.

1) preview on screen a report (ShedReport) of the subform data the record
currently displayed in the main form

2) print a report (ShedReport) of the subform data for only the animal
displayed in the main form

Here is the code I have attempted to use unsuccessfully to print ShedReport:

DoCmd.OpenReport[ShedReport]where Main![AnimalTableID]=" &
Me![AnimalTableIDShed]"

I currently am getting a syntax error

Thanks for the help

Tim
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Review the Help on DoCmd.OpenReport -- you are missing some spaces and
commas in the statement you included here. Sometimes it is easier to see
what you have done if you build the WhereCondition in a variable and refer
to the variable in the DoCmd.OpenReport, which is, as a result, somewhat
simpler to follow.

Larry Linson
Microsoft Access MVP

"Tim Graichen" <Tg*******@neo.rr.com> wrote in message
news:HI*********************@twister.neo.rr.com...
Hi!

I have a subform (ShedTableSubForm) at the bottom of my MAIN form. I would like to do two things.

1) preview on screen a report (ShedReport) of the subform data the record
currently displayed in the main form

2) print a report (ShedReport) of the subform data for only the animal
displayed in the main form

Here is the code I have attempted to use unsuccessfully to print ShedReport:
DoCmd.OpenReport[ShedReport]where Main![AnimalTableID]=" &
Me![AnimalTableIDShed]"

I currently am getting a syntax error

Thanks for the help

Tim

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.