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 
Global module
Masih Ostad Novin 
     
2 years ago
Hi. I try to create a global module but I get this error. What is wrong with my code? Thanks.
Masih Ostad Novin OP  @Reply  
     
2 years ago

Masih Ostad Novin OP  @Reply  
     
2 years ago

Kevin Robertson  @Reply  
          
2 years ago
You have declared 3 parameters but haven't included them in your call to the Sub Routine.
Masih Ostad Novin OP  @Reply  
     
2 years ago
How do you mean? Would you please explain more? Thanks Kevin.
Richard Rost  @Reply  
          
2 years ago
The error message literally tells you what the problem is: you've specified arguments (parameters) and you're not giving them when you're calling that MyCode sub.
Richard Rost  @Reply  
          
2 years ago
It would be like if I said:

MsgBox

By itself, you're going to get an error. You have to specify an argument:

MsgBox "This Is Needed!"
Kevin Yip  @Reply  
     
2 years ago
If you want to make your arguments optional, you can specify as such, as shown below.  But optional arguments still need default values.  So in short, all arguments need their values specified, unless the function has no arguments:

     Function MyCode(Optional A As Integer = 100, ... )
     ...
     End Function

     Function MyCode()
     ' This function has no arguments.
     ...
     End Function
Richard Rost  @Reply  
          
2 years ago
Gary James  @Reply  
      
2 years ago

Gary James  @Reply  
      
2 years ago
You've declared a Subroutine that takes three arguments (parameters).   But when you called the subroutine you didn't provide any of those arguments.
David Burns  @Reply  
    
2 years ago
I'm guessing that by including

AllowEdits = True
AllowAdditions = True
AllowDeletions = True


in his code, Masih thought he had included the arguments?

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

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: 5/7/2026 7:05:57 AM. PLT: 0s