Check if Shift Key Pressed On Start Up

N

nullGumby

How can I check if the shift press was pressed at startup?

In my form, I want to check if the shift key was pressed when the MDB
was started--because that would it is being ran in development mode.
In this case, certain code within the form should not run.

Thank you.
 
R

Rick Brandt

nullGumby said:
How can I check if the shift press was pressed at startup?

In my form, I want to check if the shift key was pressed when the MDB
was started--because that would it is being ran in development mode.
In this case, certain code within the form should not run.

Thank you.

In your nomal startup code set a public variable. If that variable is NOT
set then you know that the startup code didn't run.
 
N

nullGumby

In your nomal startup code set a public variable. If that variable is NOT
set then you know that the startup code didn't run.

Thanks for the reply.

Yeah, that's the method I was going to take--but was hoping to do
something that I wouldn't have to change every time I wanted to switch
modes.

The elaborate: my form ("fdlgMain") is loaded on start up via settings
on the "Startup..." dialog. In the "Form_Unload" event, I have
"Application.Quit". If I'm in development mode, I don't want Access
to end just because I'm closing the form.

I was hoping there would be a way to check--like there's a way to
check command-line parameters. Again, thanks for the response though.
 
R

Rick Brandt

nullGumby said:
Thanks for the reply.

Yeah, that's the method I was going to take--but was hoping to do
something that I wouldn't have to change every time I wanted to switch
modes.

The elaborate: my form ("fdlgMain") is loaded on start up via settings
on the "Startup..." dialog. In the "Form_Unload" event, I have
"Application.Quit". If I'm in development mode, I don't want Access
to end just because I'm closing the form.

I was hoping there would be a way to check--like there's a way to
check command-line parameters. Again, thanks for the response though.

For stuff Like that I usually do things like...

Test if the user is "me".
Test if the file extension is MDB versus MDE.
Test if the local system is my computer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top