Hi, I have two dbs: db1 and db2. Db1 has an autoexec which imports the data. Then transfer the data to DB2, which doesn't have autoexec, and quit. After several necessary steps of massaging the data, its timer event runs macro1 in DB1. Here is my code:
Private Sub Form_Timer()
On Error GoTo Form_Timer_Err
DoCmd.SetWarnings False
Call Shell("c:\program files\microsoft office\office\msaccess.exe ""C:\db2.mdb"" /x Macro A", 1)
DoCmd.Close
DoCmd.SetWarnings True
DoCmd.Quit
Form_Timer_Exit:
Exit Sub
Form_Timer_Err:
MsgBox Error$
Resume Form_Timer_Exit
End Sub
The problem is when DB1 opens, it starts autoexec, not macro A specified in my code. How can I work around this situation?
Your time and help are highly appreciated.
Private Sub Form_Timer()
On Error GoTo Form_Timer_Err
DoCmd.SetWarnings False
Call Shell("c:\program files\microsoft office\office\msaccess.exe ""C:\db2.mdb"" /x Macro A", 1)
DoCmd.Close
DoCmd.SetWarnings True
DoCmd.Quit
Form_Timer_Exit:
Exit Sub
Form_Timer_Err:
MsgBox Error$
Resume Form_Timer_Exit
End Sub
The problem is when DB1 opens, it starts autoexec, not macro A specified in my code. How can I work around this situation?
Your time and help are highly appreciated.