Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Search Form 2.0    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Date Syntax Error
Nils Markgraf 
      
4 years ago
First of all thank you very much again for your awesome work!!

I have a problem when applying the sql code for a date-field.
I did the same thing like you showed in the extended cut for the CustomerSince field.
But I get the error message "Error 3075 - Syntax error in date of query..."
When I debug it higlights the line "Me.Recordsouce = SQL"

My access is in german language, I have the suspicion that is has something to do with the fact, that in germany the date is dd-mm-yyyy while in th US its mm-dd-yyyy if I'm not mistaken..

Thank you very much in advance for your help!!
Nils Markgraf OP  @Reply  
      
4 years ago

Nils Markgraf OP  @Reply  
      
4 years ago

Kevin Robertson  @Reply  
          
4 years ago
The problem is most likely the date separator you are using.

Instead of #01.01.1990#

try #01/01/1990#
Scott Axton  @Reply  
        
4 years ago
You are correct in that it is the DateField.  
Your date needs a closing # it looks like.  To be sure I'd need to see your where statement.

It should lood something like this;

WhereStr = WhereStr & "YourDateField >= #" & YourDateFieldSearch & "#"

As Kevin indicated note the & "#" at the end.
Scott Axton  @Reply  
        
4 years ago
If you do have that then it most likely is the regional date settings.
Nils Markgraf OP  @Reply  
      
4 years ago
Thank you guys alot for your quick replies!
My code seems to be fine (see image).
Also I get the same error whether I type in the search field "01.01.1990" or "01/01/1990".
Could you tell me how I solve the problem with regional date settings?
Thank you and Best regards!
Nils Markgraf OP  @Reply  
      
4 years ago

Nils Markgraf OP  @Reply  
      
4 years ago
Okay it works now, since I changed the windows short date settings to "yyyy-mm-dd".

Thanks for your help and sorry for the trouble!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Search Form 2.0.
 

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/5/2026 6:23:41 PM. PLT: 1s