Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie needs help with OpenReport from another database 1

Status
Not open for further replies.
Apr 25, 2002
69
0
0
US
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.
 
try putting the whole thing, referecing dbA and opening the report, into the onClick Event instead of putting it in another function, then calling the function...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top