View Full Version : The dreaded one page print!


mnjfranks
02-25-2005, 11:17 AM
I Know this would of been asked before countless times, and I appologise in advance.

I have scoured the internet trying to make sense of the replies, but I fail :< Again I am sorry!

I have created a db for a local dj. You use a form for the info, and a report for prodicung a receipt and contract.

I really desperatly need to be able to print off just that one report page, but when I print using a macro with selection selected, I get the whole load of reports.

I know you will be repeating yourselves, and I am sorry. I can of course email the db if it would help.

Thanks guys in advance

Jay Franks

WayneRyan
02-25-2005, 09:28 PM
Jay,

Put a Command Button on your form with this line of code:

DoCmd.OpenReport "YourReport",,,"[SomeField] = '" & Me.SomeField & "'"

Where "[SomeField]" is a field on your form that defines that particular
record.

Wayne

mnjfranks
02-26-2005, 05:44 AM
I cant get it to work Wayne, but thats not saying a lot!

The database is small (350kb) so if required I can send the db to have a look at?

I am probably not putting the "your report" part or something, but I only know the basics :<

Thanks for any further help.

Jay

RichO
02-26-2005, 07:59 AM
What field are you using as the primary key in your table?

WayneRyan
02-26-2005, 09:10 AM
Jay,

Tools --> Database Utilities --> Compact/Repair
Then ZIP into a file
Then attach.

Wayne

mnjfranks
02-26-2005, 09:25 AM
RichO
I am using a autonumber entry called "Booking_Ref"

Wayne
Hope the upload works. Thanks for the help again.


Jay

WayneRyan
02-26-2005, 10:22 AM
Jay,

On your "Print Report" button:

DoCmd.OpenReport "Customer contract", , , "[Booking_Ref] = " & Me.Booking_Ref

In Design View for the Command Button, select "[Event Function]" and put
that line of code.

Wayne

mnjfranks
02-26-2005, 12:18 PM
Thats superb, thanks Wayne.

I am sure there is a way to print off the one you are looking at, but the method you have given only requires me to know the booking ref number so I am more than happy.

Thanks, and I sing your praises tonight :)

Jay