hi,
i have this code for opening a report in access
it is working fine when my database is open , when i close my database and press the print button i get an error msg:Code:Dim strDocName As String Dim strWhere As String strDocName = "MyReport" strWhere = "[serial]=" & Me!txtserial DoCmd.OpenReport strDocName, acPreview, , strWhere
you can't carry out this action at the present time.
and the error at this line :
DoCmd.OpenReport strDocName, acPreview, , strWhere
why when i close my database i get this error?




Reply With Quote