Microsoft Access failed to create the Visual Basic Module (1 Viewer)

thangvo008

New member
Local time
Yesterday, 19:07
Joined
Jul 31, 2014
Messages
3
Microsoft Access 2010, 64 bit, Windows 7.
I modified the Northwind DB Template.
I tried to add an Event Procedure, but all I got was an error message:

“Microsoft Access failed to create the Visual Basic Module,
“If your database is on a network drive, (which it is not) check your network connection, and then try again”.

My database is only 6MB in size.

I have modified my registry value data from 3 to 2, to loose the control from Access, as one of the articles suggested, but it did not change anything. The same error message continue to display.

Basically I could not get to the Visual Basic Module in order to code.

Any idea of why this happened? and how to fix it?
I appreciate if anyone could shed me some lights.
 

JHB

Have been here a while
Local time
Today, 04:07
Joined
Jun 17, 2012
Messages
7,732
Is it one this one database or them all?
If only this one try a "Compact and Repair" or create a new database and import all object from the problem database.

I have modified my registry value data from 3 to 2, to loose the control from Access, as one of the articles suggested, but it did not change anything. The same error message continue to display.
What do you mean about the above, security settings or what?
 

thangvo008

New member
Local time
Yesterday, 19:07
Joined
Jul 31, 2014
Messages
3
Thanks JHB. I have tried that before posting my question. It's did not help at all.
Yes, the setting is used to restrict the level of safety the command data may impose to the Database. The article stated that by resetting Sandbox mode (Value Data) one allows unsafe expressions to run in all instances of Access for all users on the computer. The value and its corresponding meaning is as follows:

0 Sandbox mode is disabled at all times.
1 Sandbox mode is used for Access, but not for non-Access programs.
2 Sandbox mode is used for non-Access programs, but not for Access.
3 Sandbox mode is used at all times. This is the default value, set when you install Access.

I took my chance to reduce one knot down to see if it worked. Apparently, it did not have any affect on my case.
 

JHB

Have been here a while
Local time
Today, 04:07
Joined
Jun 17, 2012
Messages
7,732
Thanks JHB. I have tried that before posting my question. It's did not help at all.
What exactly did you try and you didn't tell if it only this database or them all?
How are you setting for Macros?

Try to open the database on another computer or post it here, (with sample data and zip it).
 

Attachments

  • MacroSe.jpg
    MacroSe.jpg
    35.2 KB · Views: 6,022

G R Hughes

New member
Local time
Yesterday, 19:07
Joined
Oct 14, 2019
Messages
3
Hi,
Just had this same problem.
Found that the problem was a Form I had just copied from another, in the same database. Deleted that form and I could suddenly add new modules again.
I had tried usual stuff -Repair and Compact, Import database, Decompile, etc, to no avail
Hope that helps anyway
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 19:07
Joined
Oct 29, 2018
Messages
21,449
Hi,
Just had this same problem.
Found that the problem was a Form I had just copied from another, in the same database. Deleted that form and I could suddenly add new modules again.
I had tried usual stuff -Repair and Compact, Import database, Decompile, etc, to no avail
Hope that helps anyway
Hi. Welcome to AWF! Thanks for sharing.
 

G R Hughes

New member
Local time
Yesterday, 19:07
Joined
Oct 14, 2019
Messages
3
Just a late addition to this..

I came across the problem again, after Access failed when I tried top copy a Report with 'Out Of Memory'. And when I created a new report and tried to access the VBA I got the message as above ('failed to create the VB module..')
I tried the import to a fresh database. It failed on two modules. But then I could copy a report (or presumably a Form). I could later import these two modules, and all looked normal - except that I now could not copy a report.
The answer seems to have been that Access had too many modules (I do have a lot lot in this project). If I deleted just one module, and then imported one of the supposed corrupt modules, all was fine - I could then copy a report
Hope that helps someone sometime anyway
 

isladogs

MVP / VIP
Local time
Today, 03:07
Joined
Jan 14, 2017
Messages
18,209

G R Hughes

New member
Local time
Yesterday, 19:07
Joined
Oct 14, 2019
Messages
3
Thanks for your reply.
I had actually done all the usual stuff - Repair, Decompile, Import, etc
I have a slight confession to make - I am using a very old version of Access (1997) - much faster to work with for navigation etc, in my opinion, though release to users as mde or sometimes accde
So perhaps the module limit is much less than that 1,000, for Access 97.
Though if you count Form and Report modules, I reckon I must be close if not over that number.
 

isladogs

MVP / VIP
Local time
Today, 03:07
Joined
Jan 14, 2017
Messages
18,209
Thanks for your reply.
I had actually done all the usual stuff - Repair, Decompile, Import, etc
I have a slight confession to make - I am using a very old version of Access (1997) - much faster to work with for navigation etc, in my opinion, though release to users as mde or sometimes accde
So perhaps the module limit is much less than that 1,000, for Access 97.
Though if you count Form and Report modules, I reckon I must be close if not over that number.

We all have our cross to bear!
I loved A2003 and still occasionally use that ...but never liked A97!
Lots of missing functionality
Also A97 files whether mdb or mde are inherently less secure than ACCDB/ACCDE files.
See http://www.mendipdatasystems.co.uk/compare-access-file-security/4594444323
 

masons

New member
Local time
Today, 06:37
Joined
Oct 7, 2020
Messages
15
Microsoft Access 2010, 64 bit, Windows 7.
I modified the Northwind DB Template.
I tried to add an Event Procedure, but all I got was an error message:

“Microsoft Access failed to create the Visual Basic Module,
“If your database is on a network drive, (which it is not) check your network connection, and then try again”.

My database is only 6MB in size.

I have modified my registry value data from 3 to 2, to loose the control from Access, as one of the articles suggested, but it did not change anything. The same error message continue to display.

Basically I could not get to the Visual Basic Module in order to code.

Any idea of why this happened? and how to fix it?
I appreciate if anyone could shed me some lights.
its funny but when i changed the folder names that my access file was in it and the form name it solved my problem.

my folder name contain - in it and i delete it . and my form name was in persian language i make it into english.
 

Users who are viewing this thread

Top Bottom