Run-time error 2046 (1 Viewer)

AccessKid

Registered User.
Local time
Today, 13:14
Joined
Jun 26, 2002
Messages
36
I have a macro that works that calls the RunCommand Import menu and it works fine when the database is displayed but fails when the database is hidden. The error message is

Run-time error '2046':

The command or action 'Import' isn't available now.

I tried converting the macro to a module and called the function from vba but still the line that says DoCmd.RunCommand acCmdImport fails with the same error message.

Anybody has a solution?
 

AccessKid

Registered User.
Local time
Today, 13:14
Joined
Jun 26, 2002
Messages
36
Thanks for the link but I found out, quite by accident, that the problem is solved if there is a form open when the Import command is called. The problem was, I have some users who did not need any form in the program but only reports. Thus, they are not required to open any form at all but they need to import data into the tables before generating their reports. For those users, the Import command became unavailable while no form is visible. Now I only need to create a splash form in the program that's always visible for all users. :eek:
 

Users who are viewing this thread

Top Bottom