Results 1 to 2 of 2

Thread: DLookup problem

  1. #1
    Join Date
    Jul 2014

    Unanswered: DLookup problem

    Hello everyone,

    I have just joined this forum as I am trying to get to grips with MS Access 2013. I apologise if I have posted this in the wrong place!

    I am sure that I am about to ask a very simple question... But this is driving me mad!!

    What is wrong with this Dlookup formula?

    =DLookUp("[UnitPrice]","Order Details","OrderID = " & [Forms]![Orders]![UnitPrice])

    I am trying to look up Unit Price from a form (Order Details) based on a value in a text box on a form (Orders).

    This is not rocket science, I know... but it just returns #Type! when I run the form and I cannot work out why.

    I have trawled forums etc and have found many solutions for more complicated Dlookup requests. I have copied and Pasted this from the MS help function to try and learn how it works and just cannot get it to complete

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    You are telling the dlookup to look for an orderID that matches the value in a control called unitprice. Unless you have been especially liberal with you column and control names that doesnt look right to me.

    a type error normally suggests the Access runtime is being supplied with a value with anincompatable datatype, which is possible if the unitprice control is formatted as a currency datatype.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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