Hello,
I am trying to use VBA attached to a command button in another piece of software to open just a form of an Access database.
Here is the code that I have copied into VBA and this works fine except it shows everything including the form.
Any help in modifying the code to just show just the form with everything else hidden/minimized would be appreciated.
I have my database set to open on the form at start up.
Sub test()
sDBFILE = "C:\thermoforming\database test.mdb"
Set objAccess = CreateObject("Access.Application")
objAccess.Application.Visible = True
objAccess.Application.RunCommand 10
objAccess.OpenCurrentDatabase sDBFILE
End Sub
Thanks,
Hunter
I am trying to use VBA attached to a command button in another piece of software to open just a form of an Access database.
Here is the code that I have copied into VBA and this works fine except it shows everything including the form.
Any help in modifying the code to just show just the form with everything else hidden/minimized would be appreciated.
I have my database set to open on the form at start up.
Sub test()
sDBFILE = "C:\thermoforming\database test.mdb"
Set objAccess = CreateObject("Access.Application")
objAccess.Application.Visible = True
objAccess.Application.RunCommand 10
objAccess.OpenCurrentDatabase sDBFILE
End Sub
Thanks,
Hunter