Delete a module

Mac1206

Board Regular
Joined
Jun 3, 2016
Messages
184
Can anyone provide me with the steps to delete this module off my form homepage in access...I'm receiving this error when it opens now but it won't let me delete module 5 nor do I know how...Right clicking won't work...

error message when database opens to form homepage: undefined function network username in expression
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try the following. Before you open the database hold down the Shift Key and then open the database that should bypass any automations, then you should beable to open the form in edit mode and find the module you want to delete, a warning though, do you really want to delete the module? I would take a copy of it before you delete it incase it is doing something vital. Or look to comment out the code line which provides the error until you understand what it should be doing.
 
Last edited:
Upvote 0
Try the following. Before you open the database hold down the Shift Key and then open the database that should bypass any automations, then you should beable to open the form in edit mode and find the module you want to delete, a warning though, do you really want to delete the module? I would take a copy of it before you delete it incase it is doing something vital. Or look to comment out the code line which provides the error until you understand what it should be doing.

I see the module which is Module5 but when I try to remove it it gives the Error File Not Found but the module is still there...I made the mistake and deleted the code in the module first and then tried to delete it...Now I'm getting the Error "File Not Found". Rookie error...Still learning...uggh
 
Upvote 0
Why do you think deleting module5 will fix the problem in the homepage? In regards to deleting a module I've never heard of this error before. If you want to you can just import all your database objects into a new database (forms, reports, tables, queries, modules). And essentially rebuild it. Without module5 of course.
 
Upvote 0
Why do you think deleting module5 will fix the problem in the homepage? In regards to deleting a module I've never heard of this error before. If you want to you can just import all your database objects into a new database (forms, reports, tables, queries, modules). And essentially rebuild it. Without module5 of course.


I think that's my best course so I did that and it seems stable now...Module 5 was a button I created but didn't work and once I deleted the code out the module then tried deleting the module I got the error and when I tried opening the form this error came first "undefined function network username in expression" then it opened...Thanks

 
Upvote 0
okay, cool. Normally no problem deleting all code out of a module - so its a weird problem with the file not found error.
 
Upvote 0
Sounds as though thecommand button was calling something from somewhere else as it should have beenthe command button event you were looking to delete not the whole module asthat would relate to the form events. I would follow xenou suggestion, keep theold database in case there are things it was doing that you haven't imported intoa new one.
 
Last edited:
Upvote 0
Sounds as though thecommand button was calling something from somewhere else as it should have beenthe command button event you were looking to delete not the whole module asthat would relate to the form events. I would follow xenou suggestion, keep theold database in case there are things it was doing that you haven't imported intoa new one.


I did and thanks for the help....
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,020
Members
448,939
Latest member
Leon Leenders

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top