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
 
Top