Basics with macros !!

A

ABC

Hi there,

I have just started working with Access, and as per my boss's order, i am
developing an application in ms access. I need to bypass the shift key at
the start of my application, so after a bit of googling, found this article
at one of the Microsoft's recommended sites :

http://www.mvps.org/access/general/gen0040.htm

I have copied this code, but dont know how to call this :((((
I mean I dont know how to fire this module. Like in VB, whenever you write a
function, you can use the "Call" keyword followed by the function name,
passing the parameters in parenthesis.

But will anyone help me in doing the same in MS Access ?
I need to fire this module as soon as my application starts !

Please suggest !!
Thanks a lot.
 
T

tina

normally, you only need to run the "locking" code once, on any given
database, to set AllowBypass to False. the change will take effect the next
time you open the database - and remain in force each time it opens
thereafter, until/unless you reset AllowBypass to True.
so set it before you distribute your frontend database, by simply putting
your cursor anywhere in the procedure and clicking the Run button on the
toolbar.
but make sure you have some means of resetting the property to True, first!
i usually use a hidden command button that can only be triggered by a key
combination, and put it in the startup form and one or two other forms. i
test that code before running the "set to False" code, and i always make
sure i back up my database BEFORE running the "set to False" code.
i call the code on the command button as follows

ChangePropertyDdl "first argument", secondargument, thirdargument

but
Call ChangePropertyDdl("first argument", secondargument, thirdargument)
should also work, i believe.

hth
 
S

Steve Schapel

ABC,

Tina has given you some excellent advice here. Just wanted to comment
on your subject line... This is not exactly basic, and it has nothing
to do with macros. :)
 
Top