John Zelmer
Registered User.
- Local time
- Today, 19:49
- Joined
- May 13, 2015
- Messages
- 39
Hi, in a start-accdb I'm using the following code:
Shell """" & SysCmd(acSysCmdAccessDir) & "MSACCESS.EXE""" & " """ & "H:\Test-FE.accde"" /cmd" & " ""xyz" & """", vbNormalFocus
to open the main database in which the value "xyz" is checked to see if the database is opened in the right way. I want to prevent users from opening the main database directly.
Strange thing is that I have got this working in the main db on a newly created form that opens on start up: the first thing in the form's open event is the check:
If Not (Command() = "xyz") then
msgbox "You can't.....etc."
application.quit
endif
But now I want to do the same in the main switchboard form and the command value is just empty (null), while at the very same time the command value *is* available on the earlier form I tested with . I have no clue what's going on.
Somebody any idea?
Thanks in advance
John
Shell """" & SysCmd(acSysCmdAccessDir) & "MSACCESS.EXE""" & " """ & "H:\Test-FE.accde"" /cmd" & " ""xyz" & """", vbNormalFocus
to open the main database in which the value "xyz" is checked to see if the database is opened in the right way. I want to prevent users from opening the main database directly.
Strange thing is that I have got this working in the main db on a newly created form that opens on start up: the first thing in the form's open event is the check:
If Not (Command() = "xyz") then
msgbox "You can't.....etc."
application.quit
endif
But now I want to do the same in the main switchboard form and the command value is just empty (null), while at the very same time the command value *is* available on the earlier form I tested with . I have no clue what's going on.
Somebody any idea?
Thanks in advance
John