Results 1 to 2 of 2
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    VbA date between not bringing correct dates

    I have



    DoCmd.OpenForm "frmBookingEditAdminStep", , , "BookingDate between#" & Format(Me.txtFrom, "dd/mm/yyyy") & "# and #" & Format(Me.txtUntil, "dd/mm/yyyy") & "#"


    For BookingDate I have formatted the table field to to dd/mm/yyyy just to be sure

    and formatted the textboxes to the same on the form as well as in the VBA.

    I can't see what I have missed as I am getting dates earlier then the dates I specify in the two unbound text boxes on the form...

  2. #2
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Nevermind

    I needed to use "mm\/dd\/yyyy"

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 12-06-2011, 05:21 AM
  2. Replies: 9
    Last Post: 06-26-2011, 09:14 PM
  3. Replies: 0
    Last Post: 03-06-2011, 01:46 PM
  4. Correct code for challenging dates?
    By thekruser in forum Queries
    Replies: 6
    Last Post: 11-08-2010, 03:38 PM
  5. Bringing forward a data in a form
    By cwwaicw311 in forum Forms
    Replies: 9
    Last Post: 02-24-2010, 07:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums