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 
Access Increment Custom Counter
Daniel 

15 years ago
Yes Sir. I learned in one of your free tutorials not to name a field "Date" and I still made that mistake. Your Tutorials are Great!, but I'm obviously not very good at this code stuff. I did change my field "Date" to "JobDate". Yes, I do want to check it aginst the CURRENT DATE. I am not sure I need a table field for CURRENT DATE but I do want only Todays JobID's listed in the SubForm. That shows the user only the jobs completed today. I already have a RecordCreated field populated by the Now() function. That is an onclick event as the user is finished the job and "submits" the data. I tried many different versions of the BeforeInsert event. The latest is:
_________________________________
Private Sub Form_BeforeInsert(Cancel As Integer)
    Me.JobID = DMax("[JobID]", "731DailyReportT", "[Date()]= #" & Me.JobID & "#") + 1
    If Me.JobID = Null Then Me.JobID = 1
End Sub
_________________________________

With that code, I now get:

On opening the form I get "Run-Time Error '3075'

Syntax error in date in query expression '[Date()] = ##'.
________________________________
It's a little different than I got before but still the same problem because I can't figure out exactly what expression is needed. Thank you again and again for trying to help me.
Daniel

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/18/2026 3:28:16 AM. PLT: 0s