Derek Brown
asked on
Removing HasModule
I'm trying to create an ACCDE file from an Access 2016 DB. I get error Too many objects. I have about 400 objects queries forms reports etc.. Reading the help for the error it says that if Forms Reports etc. have HasModule set to Yes it doubles the number of objects that Access counts. Is there way to remove HasModule or set it to no so that I can try to create an ACCDE file. AS there are so many I wondered if code like this exists:
Dim obj As Object
Dim I As Integer
'Forms
For Each obj In CurrentProject.AllForms
Application.acForm , obj.Name, bHideUnhide (replace with something like HasModule=False)
Next obj
'Reports
For Each obj In CurrentProject.AllReports
Application.SetHiddenAttri bute acReport, obj.Name, bHideUnhide (replace with something like HasModule=False)
Next obj
Dim obj As Object
Dim I As Integer
'Forms
For Each obj In CurrentProject.AllForms
Application.acForm , obj.Name, bHideUnhide (replace with something like HasModule=False)
Next obj
'Reports
For Each obj In CurrentProject.AllReports
Application.SetHiddenAttri
Next obj
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You could probably create some code to iterate through the Documents object, and iterate through all of the procedures in each object (form, reports, and modules), but that would be A LOT of work.
I agree with Jim and Daniel that your first step should be to decompile the application (or import all objects into a new database) and then attempt to compile it. That should clear out all of the dead wood, which would allow you to create the ACCDE file.