Hello,
I need to be able to simulate pressing Tab key twice and the Press Enter Key to close form and have DB run its internal macro.
Is there code that will do this.
I am trying to automatically update a .mde file with data from Excel. So far I have learned how to open DB and open the first form I need to update with the following code. When form closes it runs a macro in the DB. The last line of code successfully closes form, but doesn't cause DB macro to run.
Dim db As Access.Application
Sub test_opendb()
Set db = New Access.Application
db.OpenCurrentDatabase "c:\Program Files\opsnet\Opsnet20.mde"
db.Application.Visible = True
DoCmd.RunMacro "macLogin" 'this opens Logon Form
DoCmd.Close acForm, "FrmLogin", acSaveYes 'closes form,doesn't update
Thanks,
Cliff
I need to be able to simulate pressing Tab key twice and the Press Enter Key to close form and have DB run its internal macro.
Is there code that will do this.
I am trying to automatically update a .mde file with data from Excel. So far I have learned how to open DB and open the first form I need to update with the following code. When form closes it runs a macro in the DB. The last line of code successfully closes form, but doesn't cause DB macro to run.
Dim db As Access.Application
Sub test_opendb()
Set db = New Access.Application
db.OpenCurrentDatabase "c:\Program Files\opsnet\Opsnet20.mde"
db.Application.Visible = True
DoCmd.RunMacro "macLogin" 'this opens Logon Form
DoCmd.Close acForm, "FrmLogin", acSaveYes 'closes form,doesn't update
Thanks,
Cliff