I want to provide a dashboard to my team and give them buttons to pull reports out of access database. having problems calling macro in module.
please help. and thank you just for reading.
Module name: ExtReprts
Macro: Sub Reports(intReportType)
Dim appAccess As Access.Application
Set appAccess = New Access.Application
Dim filepath As String
filepath = "\\\mydatabase.mdb"
With appAccess
.OpenCurrentDatabase (filepath) 'prefer to connect without opening.
.Visible = True 'necessary?
.DoCmd.OpenModule "ReportsExternal", "Reports" 'so far, so good
DoCmd.RunMacro ("Reports(0)") 'errors out - mydatabase cannot find the object 'Reports'
End With