Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    LGrossman is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2021
    Posts
    17
    Thanks for getting back to me, I tried the suggestion below but still no joy, I actually get a Type Mismatch Error now. I dimensioned AppDate as a Double and as Date just in case that was the problem.

    I also tried dd/mm/yyyy as that is my region but still no luck.

    The 12th was the date and not month

    This is what I did: -



    Code:
    AppDate = "#" & Format(Me.AppointmentDateTxt, "mm\/dd\/yyyy") & "#"
    
    strSql = "SELECT AppointmentDate, AppStartTime, AppEndTime FROM AppointmentTbl WHERE AppointmentDate = " & AppDate
    Cheers

  2. #17
    LGrossman is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2021
    Posts
    17
    Sorry, just realised that I used Double and not Variant as the data type. It actually works now.

    Thanks once again.

  3. #18
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    Just got back - glad to see you solved it.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 05-14-2016, 10:39 PM
  2. Replies: 2
    Last Post: 02-10-2015, 10:47 PM
  3. Replies: 1
    Last Post: 03-13-2014, 07:23 PM
  4. Replies: 14
    Last Post: 01-07-2014, 04:20 PM
  5. Replies: 7
    Last Post: 08-04-2011, 07:49 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