Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Invoicing > < Switch Function | Templates >
 
Invoicing
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   17 months ago


Back to Invoicing
 

Can't Delete Empty Subs in VBA Upload Images   Link  
Steve Garrison 
55 days ago
I seem to have the following, and similar, subroutine statements in some of my VBA modules:

   Private Sub CustomerLF_Click()

   End Sub

Obviously the control name isn't the same in each case.  I think these got into the modules as I selected the 'On Click' event by mistake when I really wanted the 'On Dbl Click' event.  My problem is that I can't delete any of them.  They don't seem to be causing any issues, but I would like to clean up my fat finger mistakes.
Scott Axton
55 days ago
You have to actually delete the code from in the Code Window.

Just select the code - hit the delete key - and Save the module.
Steve Garrison
55 days ago
I have tried that, but it seems to be to no avail.  I've deleted the code in the Code Window, saved, exited, looked at the properties sheet for the control, and it appears that the 'Event Procedure' is gone from the 'On Click.'  But I can completely exit Access, reload my database and the 'On Click' 'Event Procedure' has magically reappeared.  Again it doesn't really seem to hurt anything, but I would really like to clean things up.

I may try putting a 'msgbox' in the subroutine, clicking to see if it responds with the message box, and then try deleting the code.

Thank you very much for your VERY quick replies!
Scott Axton
55 days ago
Try this:
Back up first.

In the property sheet of the form single click on the On Click event to highlight the procedure.  Press Delete key to get rid of it.  Save the form.
Then click on the ... by the On Dbl Click event to go to the Code window.
Select the whole sub (From Private down to End Sub) and delete that.  Save and close the Code window.
Save the form again and close it.

Go up to Database Tools on the menu and choose Compact and Repair Database.

Sometimes Access just gets "out of sync" and that should put you back in working order.

That should get you.  If it doesn't check out the Troubleshooter and follow the bouncing ball on that page.

This thread is now closed. If you wish to comment, start a NEW discussion, below.
 


Back to Invoicing Comments
 

Start a NEW Conversation
 
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.
 
Subscribe
 

You may want to read these articles from the 599CD News:

6/30/2022Sales Chart
6/27/2022Rounding Errors
6/26/2022Calendar Seminar Students Only
6/24/2022Multi Combo One Field
6/23/2022Modal & Popup
6/21/2022Week of Year
6/16/2022Value List Combo
6/15/2022Weekday
6/14/2022Project Budgets
6/14/2022Find Record
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn