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

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » How do I Test for Existing Date? (A2k (9.0.3821) SR-1)

    Author
    Topic
    #378173

    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

    Viewing 0 reply threads
    Author
    Replies
    • #625124

      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

    Viewing 0 reply threads
    Reply To: How do I Test for Existing Date? (A2k (9.0.3821) SR-1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: