Link to home
Start Free TrialLog in
Avatar of Not2ruthless
Not2ruthless

asked on

Access VBA DSum Multiple Criteria

In my code I have the following:

cnt = DCount("InventoryID", "tblInventory", "purchaselineitemID =" & LineItemID And "EquipmentTypeID =" & equiptype)

It works fine running each parameter separately, but not when adding the AND.  I get a datamismatch error.  (Both are numbers, not strings)   Think I'm missing something in the syntax?  

Thanks
ASKER CERTIFIED SOLUTION
Avatar of IrogSinta
IrogSinta
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
Avatar of Not2ruthless
Not2ruthless

ASKER

Thanks so much, I didn't realize neede another & before the AND
Have a great weekend!