473,320 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Printing report of subform data

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
1 4709
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: John | last post by:
Hi, I have simple database based on 3 tables. Relationship is 'one to many' between table 1 and 2, also between 2 and 3 table'one to many'. I have made form where I enter data in all 3 tables....
4
by: John Baker | last post by:
Hi: I have a form, which contains a sub form (Employee main record and payment record). It all shows up fine in a screen view, but when I come to print it I find that I cannot get the sub form...
2
by: Ellen Manning | last post by:
Using A2K. I've got a subreport that can have up to 3 lines of data. The user wants all lines underlined even if there's no data. Any idea how to do this? Below is an example of the desired...
3
by: ChadDiesel | last post by:
I've been posting questions here the last week, but if you don't know my situation: I have a "Print Labels" button on the subform that sends the appropriate box information on the subform to a...
1
by: Earl Anderson | last post by:
Using WinXP & AccessXP, I'd like to automatically have the records that I've just printed in a report automatically updated to have the 'print date & time' immediately inserted into a 'Date/Time'...
1
by: paquer | last post by:
I have forms that are used in the office as well as in the field. I want user's to be able to print out an exact copy of the form for "in the field" data entry. (Yes we are still stuck in the 90's....
2
by: Simon | last post by:
Dear reader, In case a report is a sub report the Report Header of the sub report is printed in the report but the Page Header of the sub report will not be printed. This is the same for...
1
by: Crombam | last post by:
Hi to all, After searching the net for a couple of hours I just have to ask the question. How can I close a report with a subform (Pivot Chart) when this Pivot Chart is having no data? ...
0
it0ny
by: it0ny | last post by:
Hi guys, thanks I am fairly new to this forum so I hope I chose the right place to post this question. I try to make my program printout a deposit's report. I created a class to store the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.