Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to Create MDE database 4

Status
Not open for further replies.

tpearo

Technical User
Apr 24, 2000
124
US
I have tried to create an MDE file from a Access 2000 database but keep getting the message "Microsoft Access was unable to create an MDE database." I have several modules or different versions of this database that I am deploying across a network. The modules are the same database front end but with different opening screens and menus for each different area or department. I am able to create MDE's for most of the modules but have this one that I keep getting this message with whenever I try to create the MDE.
 
There is more than likely a compile error in one or more of your modules. This will keep you from being able to convert the .mdb to .mde. Try to compile and save all you modules in the .mdb file. This should help find the problem.

HTH
RDH

Ricky Hicks
rdhicks@mindspring.com

 
Thanks Rick. The compile error was in the code for disabling the shift key. I'm using Access 2000 and for some reason doesn't like the code. Anyway when I deleted the module for this and compiled all modules the problem went away and I was able to make the MDE.
 
Quick question? Looks like you have tried to disable the "shift" key. I am trying to do this to avoid the database window being show when the "shift key" is held down when opening a database.

Can you share any suggestions or code you have found to get this to work? Also, where you able to convert to a MDE file when doing this without any errors?

Thanks!
 
I think Terry may still be having a problem, not sure.

I don't use Access 2000, so here is the code that Jerry Dennison tested for me in Access 2000 with no problems. You can try it if you like. Make sure you backup your db before you start.

'********************************************************
'This Code Disables the Shift Key
'
Public Sub DisableByPassKeyProperty()
Dim db As DAO.Database
Dim prp As Property
Set db = CurrentDb
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
db.Properties.Append prp
End Sub
'********************************************************


'********************************************************
'This Code Re-enables the Shift Key
'
Public Sub EnableByPassKeyProperty()
Dim db As DAO.Database
Set db = CurrentDb
db.Properties.Delete "AllowByPassKey"
db.Properties.Refresh
End Sub
'********************************************************

Let me kow your results.

HTH
RDH
Ricky Hicks
rdhicks@mindspring.com

 
I have tried this code with no success. I have made sure that the syntax is type in correctly but still get errors. I have settled on disabling the Access special keys and making the database an MDE with customized menu bar. Most of my users will not think to press the shift key at start-up (I hope). Anyway I have a solid backup of the database(s) and if they do get in and mess with the queries or unlink a table I have an easy fix.
 
Ensure that you have the Microsoft DAO Object Library Checked in your References. The problem could be with the statement
Dim db As DAO.Database

PaulF
 
Excellent help in this forum.
I was having the exact same problem!!

Thanks a million,

Fiona
 
Beautiful, this was my problem also.
I use the lock and unlock database I found here. Sorry can't remember who linked it.

-chris
 
Hi,

A word of warning: you should include a backdoor somewhere to reactivate the shift key (as noted by ChrisCalvert), otherwise you can lock yourself out as well as your users.

Cheers

Steve
 
No one asked what version of Access is being used to create the MDE. You can only create an MDE in the save version format as the mdb file.
Access 97 to 97
Access 2000 to 2000
Access 2002 to 2002

Good Luck!
 
Where do you put the code which disables the shift key??
 
You can put it anywhere, really.

Just be careful what event you use. Hiding the event somehow would work (like using doubleclick event of a graphic in the corner that matches the background). But the best solution would be to use another database to lock and unlock it. I downloaded one that I am pretty sure I linked to from these forums. I do not remember the URL, and cannot seem to find the post. I think it may have been something Rhicks linked to, though. Maybe someone will post the code to execute code on a foriegn database...

-chris
 
If you have no compile errors and it still will not make the mde file, the second most likely cause is that there are too many defined objects. MS Access only allows 999 objects in memory at once, and when it creates the mde it counts each one twice. I had this happen and deleted any backup/duplicate forms etc and proceeded without further issue
 
Hi all. I've encountered the same problem as they encountered. I do have some questions to clarify.

Does '999 defined objects' refer to all controls in the db?

I have several forms and some forms contain as many as 60 or more controls. The application runs well, no compile errors or whatsoever. But when I tried to create a mde file, I received "...was unable to create MDE Database."

Could this be the reason? If so, is there no way to create an mde file that has 1000 or more objects/controls?

Hope someone could help

-jewell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top