Results 1 to 3 of 3

Thread: SQL in Access '97

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Posts
    24

    SQL in Access '97 (new question)

    Ok, the following line will work as a SQL filter:


    intBoxTotalMis = DSum("[mis]", "Used", "[BoxCode] = " & strQuote & strBoxCode & strQuote

    However, the following line will not:

    intBoxTotalMis = DSum("[mis]", "Used", "[BoxCode] = " & strQuote & strBoxCode & strQuote And "[LineCode] = " & strQuote & strFilterLine & strQuote)

    When I try to run the program, it gets to this line and gives me a Run-time error '13' message stating "Type mismatch". Can anyone tell me the proper syntax to make it work?

    Thanks,
    ern

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    perhaps this will be better:

    intBoxTotalMis = DSum("[mis]", "Used", "[Boxcode] = " & strQuote & strBoxCode & strQuote & "And [Linecode] = " & strQuote & strFilterLine & strQuote)

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Posts
    24
    J,

    Perhaps is right. That was the ticket. Thanks!!

    ern

Posting Permissions

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



Click Here to Expand Forum to Full Width