Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Work Order Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Access Work Order Seminar
Lynda C 
   
12 years ago
Hi Richard

I'm unsure if the comments I posted actually reached you from the online theatre screen - I am having a problem with the way access is processing my dates.  I live in New Zealand, our date format here is dd/mm/yy - so when building the scheduleF, I've used that format, however, when I come to the lesson on filtering dates, my filters return no results.  I had a similar issue when doing the expert series...Sam Finlay replied to my query then saying that he had had a similar problem using non US regional settings.  He said I need to enclose dates with a US Format.  Is this the right way to address the issue in vba? and if so, can I put a 'global' line of code that will apply the format code anytime I'm using dates?

This is the filter I've created, which is returning no results:

Private Sub BeginDateTime_AfterUpdate()

    If Hour(BeginDateTime) = 0 And Minute(BeginDateTime) = 0 Then
        BeginDateTime = BeginDateTime + (9 / 24)
    End If
    
    ' check for conflicting appointments
    Dim ID As Long
    On Error Resume Next
    ID = 0
    ID = Nz(DLookup("ScheduleID", "ScheduleT", "WorkerID=" & WorkerCombo & " AND " & _
        "BeginDateTime < #" & BeginDateTime & "# AND " & _
        "EndDate Time > #" & EndDateTime & "#"), 0)
        If ID <> 0 Then
        'we have a conflict!
        MsgBox "CONFLICT!"
    End If
      
      
    If IsNull(EndDateTime) Then
        EndDateTime = BeginDateTime + (1 / 24)
    End If

Same issue with EndDateTime

Thanks
Lynda

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Work Order Lessons.
 

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/17/2026 8:43:57 AM. PLT: 1s