I usually use something like the below function. I just modified it from the link below...<pre><font color='#000000'><font color='#000080'>Function</font> ToggleShift(Optional fAllowShift<font color='#000080'>As</font> Boolean = False)<font color='#008000'>'This function will disable (or enable) the shift at startup causing</font><font color='#008000'>'the Autoexec macro and Startup properties to always be executed (or not)</font>
On Error<font color='#000080'>GoTo</font> errToggleShift<font color='#000080'>Dim</font> db<font color='#000080'>As</font> DAO.Database<font color='#000080'>Dim</font> prop<font color='#000080'>As</font> Property
Const conPropNotFound = 3270<font color='#000080'>Set</font> db = CurrentDb()<font color='#008000'>'This next line disables the shift key on startup.</font>
db.Properties("AllowByPassKey") = fAllowShift<font color='#008000'>'function successful</font>
ExitHere:<font color='#000080'>Exit</font><font color='#000080'>Function</font>
errToggleShift:<font color='#008000'>'The first part of this error routine creates the "AllowByPassKey</font><font color='#008000'>'property if it does not exist.</font><font color='#000080'>If</font> Err = conPropNotFound<font color='#000080'>Then</font><font color='#000080'>Set</font> prop = db.CreateProperty("AllowByPassKey", _
dbBoolean, fAllowShift)
db.Properties.Append prop
Resume ExitHere<font color='#000080'>Else</font>
MsgBox "Function 'ToggleShift' did not complete successfully."
Resume ExitHere<font color='#000080'>End</font><font color='#000080'>If</font><font color='#000080'>End</font><font color='#000080'>Function</font></font></pre>
This was modified from
http://www.tek-tips.com/gfaqs.cfm/lev2/4/lev3/27/pid/181/fid/93
To use this to Disable the shift key, call it like this:
ToggleShift
or
ToggleShift False
or
Call ToggleShift(False)
To Enable the shift key after you have disabled it,
ToggleShift True
or
Call ToggleShift(True)
HTH,
Russell
This message was edited by Russell Hauf on 2003-01-09 01:51