Unable to create .accde

It is my understanding that when you create a .accde, ACCESS copies the original .accdb file and converts the copy to .accde. Therefore, if you attempt to open the new .accde file without first closing the original .accdb file, you will get that message. Is that what happened?
To create the .accde you must be inside the .accdb.
 
I fixed the problem by moving everything on a new pc. The old pc was a generation 6 pc which was taking its time to respond and maybe this has something to do with the problem. It's been a few months now that the creation of the .accde was a matter of luck. Sometimes it worked and sometimes it did not. Looking back, maybe the entire problem is a hardware problem which manifested itself in large dbs.
 
To create the .accde you must be inside the .accdb.
Although that is the standard approach, it is possible to create an ACCDE of an external database using code:

Code:
Sub MakeACCDE(strPathSource As String, strPathDest As String)

      Dim app as Object

      'First create the Access Automation object
      Set app = CreateObject("Access.Application")

      'Now call the undocumented function
      'this may give err 7952 - illegal function call
      'app.SysCmd 603, strPathSource, strPathDest

      'fix by explicitly setting the paths as strings
      app.SysCmd 603, CStr(strPathSource), CStr(strPathDest)

End Sub

For more info, see my article:

Since I wrote that article, SysCmd 603 has become officially supported as acSysCmdCompile
If preferred use

Code:
Sub MakeACCDE(strPathSource As String, strPathDest As String)

      Dim app as Object

      'First create the Access Automation object
      Set app = CreateObject("Access.Application")

      'Now create the ACCDE using SysCmd acSysCmdCompile
      'explicitly set the paths as strings
      app.SysCmd acSysCmdCompile, CStr(strPathSource), CStr(strPathDest)

End Sub
 
Last edited:
I will try the above.

Well I spoke too soon. I was able to create once the .accde and then I get the same problem.

Basically that the .accdb is already in use. In the Help it mentions that there may be too many TableIDs
 
Last edited:
Could this be the problem?

Tableids.png
 
if you have that number of forms and reports, etc. possibly - I believe accdb’s have a higher capacity than mdb’s - recent tests on another thread indicate the number of objects is more like 5000 rather than 1000
 
if you have that number of forms and reports, etc. possibly - I believe accdb’s have a higher capacity than mdb’s - recent tests on another thread indicate the number of objects is more like 5000 rather than 1000
The number is at least 2048.

Would it help if I set the Has Module to False for many of the forms and reports?

Edit: There is no problem in creating .accde for the smaller dbs
 
OK several points here.
1. As stated, the database MUST be compiled - which you've stated yours is!
2. @arnelgp stated that you should open in exclusive mode. That won't do any harm but isn't a requirement for creating an ACCDE.
3. @LarryE stated that the ACCDB should be closed before opening an ACCDE created from it. Again, it won't do any harm but it isn't necessary

I have successfully created ACCDEs from very large split databases including one with over 5500 objects in the FE including almost 600 forms & 900 reports, almost all of which have code modules. I doubt that setting HasModule to False will help. What it will do is remove all the code you had in those modules.

Before you start making possible unnecessary changes to your database, can I suggest you read another of my articles:

Perhaps that will contain some info to help solve your issue
e.g. empty procedures, missing references, incorrect API declarations, old ActiveX controls
 
Forgot to say that two Access limits are being muddled above
1. The maximum number of code modules is officially 1000 but in my tests the actual figure is about 5450 in A365. Possibly less in A2013
2. The maximum number of open TableIDs was 2048 until last year when that limit was doubled in A365. TableIDs are also created by queries, form/report record sources, list box and combo row sources and SQL in code modules in addition to open tables.
However I doubt this limit is preventing you creating an ACCDE
 
Last edited:

Users who are viewing this thread

Back
Top Bottom