I'm trying to open a different database from within the current database. If I do this from a button, this works beautifully. But if I try and use it from my toolbar, I get an error message:
"SHIP (Investments Project) can't find the name 'rptProblem' you entered in the expression"
as you see below, that is the correct name of the function I'm trying to call.
Thanks for any help.
"SHIP (Investments Project) can't find the name 'rptProblem' you entered in the expression"
as you see below, that is the correct name of the function I'm trying to call.
Code:
Public Function RptProblem()
Dim strDB As String
' Initialize string to database path.
Const IssuesDB = "T:\Wisha db\Training & Outreach\Issues.mdb"
strDB = IssuesDB & "Issues.mdb"
' Create new instance of Microsoft Access.
Set appAccess = _
CreateObject("Access.Application")
' Open database in Microsoft Access window.
appAccess.OpenCurrentDatabase strDB
' Open Orders form.
appAccess.DoCmd.OpenForm "frmSignIn"
End Function
Thanks for any help.