Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2006
    Posts
    34

    Unanswered: dlookup promblem

    Hi all I cant seem to see if anything is wrong with this ?

    The error I get is data type mismatch

    varsupp = DLookup("[supp_id]", "qryorder", "[order_no] = '" & varpk & "'")

    Any ideas would be grate

    Thanks

    James

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    And what is the Type of the column [order_no]? I suspect it's not string/text ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Sep 2006
    Posts
    34
    its a number

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by jamesf248
    its a number
    Drop the single quotes then ...
    Back to Access ... ADO is not the way to go for speed ...

  5. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    And just as an aside, order_no (which I'm guessing means order number) like phone numbers, social security numbers and other "numbers" used for identifiers but not used in mathematical calculations, should not be defined as a numerical data type, but rather as text.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    Join Date
    Sep 2006
    Posts
    34
    Thank you!!

Posting Permissions

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