I am trying to do a DLookup but no matter what I do, keep getting Type Conversion Errors.
In Access, I am using an update query, and trying to use the looked up value as the "update to" field.
Here is what is in the "Update To" field of the Query:
DLookUp("[RegionalPrice]","tblRegionalPrice","[tblRegionalPrice]![RegionalPriceID] = """ & [tblInvoice]![PartID] & """")
Here is the SQL from the query:
UPDATE tblInvoice INNER JOIN tblRegionalPrice ON tblInvoice.PartID = tblRegionalPrice.RegionPriceID SET tblInvoice.RegionalSubtotal = DLookUp("[RegionalPrice]","tblRegionalPrice","[tblRegionalPrice]![RegionalPriceID] = """ & [tblInvoice]![PartID] & """");
I have ensured that RegionPrice and RegionalSubtotal are both currency values, and that the RegionPriceID and PartID are both Text values.
Any ideas what I am doing wrong here?
Thanks
Patrick
In Access, I am using an update query, and trying to use the looked up value as the "update to" field.
Here is what is in the "Update To" field of the Query:
DLookUp("[RegionalPrice]","tblRegionalPrice","[tblRegionalPrice]![RegionalPriceID] = """ & [tblInvoice]![PartID] & """")
Here is the SQL from the query:
UPDATE tblInvoice INNER JOIN tblRegionalPrice ON tblInvoice.PartID = tblRegionalPrice.RegionPriceID SET tblInvoice.RegionalSubtotal = DLookUp("[RegionalPrice]","tblRegionalPrice","[tblRegionalPrice]![RegionalPriceID] = """ & [tblInvoice]![PartID] & """");
I have ensured that RegionPrice and RegionalSubtotal are both currency values, and that the RegionPriceID and PartID are both Text values.
Any ideas what I am doing wrong here?
Thanks
Patrick