PDA

View Full Version : Open Report Function



Calico362
04-18-2006, 07:42 PM
I'm taking a college class in Access and this one project has me stumped. I'm trying to open a report in a form using a command button. Below is the code I'm using but for some reason it prints the report not opens. Can some please tell me where I'm wrong. :banghead:

Function RunWalkerMasterList()
On Error GoTo RunWalkerMasterList_Err

DoCmd.OpenReport "Walker Master List", acNormal, acReadOnly

RunWalkerMasterList_Exit:
Exit Function

RunWalkerMasterList_Err:
MsgBox Error$
Resume RunWalkerMasterList_Exit

End Function

Thanks

OBP
04-19-2006, 03:26 AM
On the end of the Docmd you should have acPreview, not acReadOnly.