Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I Test for Existing Date? (A2k (9.0.3821) SR-1)

    How do I Test for Existing Date?
    A2k (9.0.3821) SR-1

    When the operator enters a date I want to test to make sure it is not already stored in a database record

    Getting the following error:

    3464 Data type mismatch in criteria expression

    If Not IsNull(DLookup("dteSumDate", "tblSumServe", "dteSumDate= """ & Me!BatchDate & """")) Then

    Need syntax for properly wrapping the criteria expression.

    dteSumDate is defined as date/time

    BatchDate is unbound text box on form

    Thanks, John

  2. #2
    2 Star Lounger
    Join Date
    Aug 2001
    Location
    USA
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I Test for Existing Date? (A2k (9.0.3821) SR-1)

    If you are checking a Date field, I believe that you have to enclose your the date in the number sign, #.

    If Not IsNull(DLookup("dteSumDate", "tblSumServe", "dteSumDate= #" & Me!BatchDate & "#")) Then

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I Test for Existing Date? (A2k (9.0.3821) SR-1)

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •