ChuckCasey
MIS
I want to create a button in DatabaseB that will open a report that is in DatabaseA. I created a reference in DatabaseB to DatabaseA. I built a module in DatabaseA with the following:
--------------------------
Public Function OpenNSFReport2()
DoCmd.OpenReport "rptticketsbydate", acViewPreview
End Function
--------------------------
Then in the OnClick event of the button in DatabaseB I typed:
OpenNSFReport2
I get an error; sub or Function Not Defined.
I can run the module from the VB window in DatabaseB, so I think the reference is ok. It's just the last part that is giving me trouble. Can someone help? Thanks.
--------------------------
Public Function OpenNSFReport2()
DoCmd.OpenReport "rptticketsbydate", acViewPreview
End Function
--------------------------
Then in the OnClick event of the button in DatabaseB I typed:
OpenNSFReport2
I get an error; sub or Function Not Defined.
I can run the module from the VB window in DatabaseB, so I think the reference is ok. It's just the last part that is giving me trouble. Can someone help? Thanks.