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 Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Runtime error 3061 too few parmeters
Tim Rusk 
     
2 years ago
I wrote the following VBA code

CurrentDb.Execute "INSERT INTO EmployeeXCourseT " & _
        "(EmployeeID, CourseID, EnrollmentDate, DeadlineDate, StatusID) " & _
        "VALUES (" & EmployeeID & ", " & MissingCourseList & ", #" & Date & "#, " & "# " & _
        Date + 30 & "#, 1)"

I keep on receiving this message, I tried to remove spaces but noting works

Alex Hedley  @Reply  
           
2 years ago
Which message?
Adam Schwanz  @Reply  
           
2 years ago
Your Problem is here. It's usually simpler to write these on one line, then you would probably catch the mistake.
"# " & _
        Date + 30

On one line that looks like  "# Date + 30 & "#,1
Missing the & and " after the # symbol   "#" & Date + 30 & "#,1
Kevin Robertson  @Reply  
          
2 years ago
I tested the code as written above and it worked with no errors.
It may be an incorrect data type. Or you may have made a mistake in one of the Queries that feeds the List Box.

Too Few Parameters
Adam Schwanz  @Reply  
           
2 years ago
That & really works across two lines to concatenate the Date+30 as well? That's interesting.

I would still try to simplify the statement in one line, and remove the extra & "# " & and just put it in the string before it. See if this works
CurrentDb.Execute "INSERT INTO EmployeeXCourseT (EmployeeID, CourseID, EnrollmentDate, DeadlineDate, StatusID) VALUES (" & EmployeeID & ", " & MissingCourseList & ", #" & Date & "#,#" & Date + 30 & "#, 1)"
Tim Rusk OP  @Reply  
     
2 years ago
Thank You everyone, I will try

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer 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 9:55:29 PM. PLT: 1s