print preview problem

M

Michael Turner

Hi

Can anyone tell me why I get this error message "Object doesn't support this
property or method."
at the line "Set rpt = Reports!shipping".

The funny thing, is that the same code works fine when placed behind a
button
on some forms but not others.


Dim rpt As Access.Report

DoCmd.OpenReport "shipping", acViewDesign
Set rpt = Reports!shipping
rpt.RecordSource = "qry_shippingCourier"

DoCmd.OpenReport "shipping", acPreview


Thanks in advance

Mick
 

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