AppActivate spontaneously stopped working

V

Vashfish

I inherited a very convoluted system when I started working at my new
job. We have a database that uses AppActivate to switch between a few
different Access applications. The other day, my computer spontaneously
started giving me the error (even though everyone else's are working
properly):

Run-time error '5':

Invalid Procedure call or argument

Now, I've seen a few other posts like this but our situation is unique:
the code actually uses the failure of AppActivate to open the other MDB
files by using error checking:

-----------------
On Error GoTo Err_ActivateReportsButton_Click
AppActivate "Reports"
Exit_ActivateReportsButton_Click:
Exit Sub

Err_ActivateReportsButton_Click:
DoCmd.Hourglass True
'KV1Reports is not open, so open it
Set objReports = CreateObject("Access.Application")
strDBName = ApplicationPath & "KV1Reports.mdb"

objReports.OpenCurrentDatabase strDBName, False
objReports.Visible = True
objReports.UserControl = True
objReports.DoCmd.Maximize

DoCmd.Hourglass False
Resume Exit_ActivateReportsButton_Click
 
V

Vashfish

Never mind. It turns out it's a more fundamental problem. I made a new
post about it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top