Link to home
Start Free TrialLog in
Avatar of Cobra967
Cobra967Flag for United States of America

asked on

Ms Access DLookup with multi criteria and a Null value

Hello all,

I can not figure out what I am doing wrong with this syntax. I know that I am screwing thing up when filtering data [RemovedBy] for Null only data. My guess is that I am missing or miss placed quotation marks. Help!!!!

DLookup("LotNumber","CM_SOLUTION_USAGE", "[Station] = " & [Forms]![Station Replenishment]![Station] & " And [Solution] =  " & [Forms]![Station Replenishment]![cmbSolution]  & " And [RemovedBy]Is Null")

Thank you!!!
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Is Station or Solution are Text fields:

DLookup("LotNumber","CM_SOLUTION_USAGE", "[Station] = '" & [Forms]![Station Replenishment]![Station] & "' And [Solution] =  '" & [Forms]![Station Replenishment]![cmbSolution]  & "' And IsNull([RemovedBy])")
Avatar of Cobra967

ASKER

[Station] is a number, [Solution] is a text and [RemovedBy] is a text.
Thank you Scott but it does not work yet, I get error Run-time 3464.
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial