views:

211

answers:

2

So I have a MS Access database at work. Recently I tried to put out another MDE file, that actually took something off a report that was previously there. Now I am getting this error that says, "MS Access cannot create the MDE" with a little show help button....click the show help button and it gives a description about this relating typically to too many objects (Forms, reports, tables, etc). This database is not very big at all, so I am wondering how this could be happening?

Does it count each time I release an MDE with only minor changes, all the same forms, reports, etc over and over again?

Could this be another error and the pop up box is kind of blanket or generic?

Is there anyway to solve this?

Does this count objects on a form/report (text boxes, cmb boxes, etc)?

Basically the example given in the help says that if you have 500 forms, and 2 modules for each form, then that would count as a 1000....this database has about 12 forms, 4 queries, 16 tables (max record = >1000 records) and is not very big. Since the last time I released an MDE with no problem, I have only tried to deleate an item off a report for this new one, without adding anything new.

Please help....there are screaming for this, and I am at my wits end!

Thanks

+1  A: 

Objects count for the life of the database, that is, even if you delete them, they still count. I suggest you decompile, compact & repair, and then copy everything into a fresh database, which will get you a nice, clean copy. Make sure it compiles and then create your mde.

Remou
Remou! Thanks....but seeing how this is all brand new to me, then I have questions:So the script from the link provided is generic, and I can use that one to accomplish the decompile?This is split between BE mdb, dev MDB, and FE mde, and so the question I have is, the only one I need to copy is the middle dev mdb? Will that still have connection to the BE tables?Thanks again!
Justin
Yes it is generic script, you could also create a batch file or a shortcut to accomplish the same end. A decompile will not affect linked tables, if you import a linked table into a fresh mdb, the link will import, that is, you will have a linked table in the fresh mdb. As an aside, it is usually best to have some code that checks and relinks tables if necessary.
Remou
And, yes, only the dev mdb needs to be copied as that is the one that will become the mde.
Remou
A form or report can't have more than one module. I also very much doubt that this is the solution. That script isn't completely generic as it's possible that the msaccess.exe program is in a different folder.
Tony Toews
@Tony Toews I think one of your comments is intended for the OP, not this one, I cannot see any reference here to a form or report having more than one module.
Remou
Remou, you're correct.
Tony Toews
Remou, I have one more question then...what is the benefit of running the decompile, if I am just copying everything over to a brand new MDB file, to make the new MDE?? couldn't I just do that anyway....sorry but it is my lack of understanding the decompile! Thanks!
Justin
As I understand it, if there are odd things happening in code, it might interfere with copying the various objects, which decompile may fix.
Remou
gotcha...so it is most likely that the problem here is code along the way somewhere. thanks guys...i will start searchin.
Justin
+1  A: 

Yes, this is a misleaidng and blanket error message. Try compiling your code. Ctrl+g >> Debug >> Compile should tell you what line of codes is/are causing your problem.

I would suggest compiling your code on a frequent basis. I do so every few lines of code.

Chances are you had some code in the report referencing the control you removed from the report.

Tony Toews
thanks very much! so if i go back through the modules, and "debug" in the immediate window, this will point out code that the VBA window itself won't?
Justin
Your question doesn't make sense. Compiling the code will find all the compile errors one at a time though.
Tony Toews