Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Help with Event Handler
Debbie Heaney 
     
4 days ago
I have 6 buttons all essentially doing the same thing, opening a report with a where condition and a form also with a where condition.
6 buttons with 2 lines of code = 12 identical lines of code.
Idea is make a Public Function "OpenDBSStuff" then in the button OnClick Event "=OpenDBSStuff(1)".
The intelisense detects the Function and it's parameter but errors out.
I've watched a few videos for hints and tips.
Event Handler Function: https://599cd.com/blog/display-article.asp?ID=2268
Fitness 68(Extended Cut) : https://599cd.com/blog/display-article.asp?ID=4307
Fitness 57: https://599cd.com/blog/display-article.asp?ID=3748
Screenshot to follow...
Debbie Heaney OP  @Reply  
     
4 days ago

Debbie Heaney OP  @Reply  
     
4 days ago
I've tried Starting the function off "Public Function OpenDBSStuff(lngWhatDay As Long)" and using ByRef too.
I've tried putting the function in "Form_MainMenuF" where the buttons are.

Saving things, closing things, Compact and Repair. All throw the same error.
Kevin Robertson  @Reply  
          
4 days ago
Your function has the same name as your module.
I would prefix the module name with mod (Example: modOpenDBSStuff).
Debbie Heaney OP  @Reply  
     
4 days ago
Spot on Kevin, Thank you. I won't say how long (about an hour) I've been trying to figure that out.
Too busy multitasking i think? Trying to figure out other things too.
Add a Reply Upload an Image
Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

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
PCResale.NET
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
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/5/2026 8:47:39 PM. PLT: 1s