G
Garret
How do I disable the shift key on the .MDE? This seems to be the only
problem remaining.
problem remaining.
Garret said:How do I disable the shift key on the .MDE? This seems to be the only
problem remaining.
Garret said:Ok thanks, now where would I paste this code? (so that it runs at
startup, right?). It seems like an easy problem but I don't know what
to do.
Garret said:Alright, so if I put this code into the MDB before I make the MDEs, I
should be all set, assuming that I log in as an Admin each time?
Basically this code disables the shift key overall, unless it is an
admin who logs in, correct?
Garret said:I tried testing this on backup copies, and every time I tried to build
the MDE after inserting the code, it gives me a message box that tells
me it was unable to build the MDE. I deleted the module containing
the code, and I could construct the MDE afterward, so it must be the
source of the problem. Am I doing this in the correct order:
- Split original database
- Insert code into MBD
- Create MDE
And this is all done without opening or closing anything.
Garret said:I did a "Compact and Repair" (if thats what you meant by compile)
Garret said:I did that...sure enough it hit an error on the first line of real
code for the module that says:
Function ChangePropertyDdl(stPropName As String, _
PropType As DAO.DataTypeEnum, vPropVal As Variant) _
As Boolean
It errors me: "User-defined type not defined"
I'm clueless again...I copied and pasted the code in my module from
the link you previously posted, so there couldn't be anything missing.
Garret said:I couldn't find a DAO on the list of things, but the ones that were
checked were:
Visual Basic For Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
Bennet-Tec MetaDraw Control
Garret said:Oh, it had the word Microsoft before it so I didn't find it right
away. Anyway, that worked and it compiled without any problem. I
then made the MDE, but I can still see the "normal" access interface
while holding the shift key during startup.
Garret said:I thought that all modules run automatically when the program starts,
no?
If not, how do I run the code?
Rick said:No. Modules are where you create custom code to "do stuff". It wouldn't
make much sense for all of the "stuff" to just fire off every time you open
your file.
In a module you have functions and subs. The code you downloaded consists
of two functions. On ethat creates and sets a custom databse property and
one that does the same thing in a manner such that only users with
Administer authority on the database can change the settings on that
property once it is set.
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.