wcboyd
Registered User.
- Local time
- Yesterday, 18:43
- Joined
- Aug 30, 2004
- Messages
- 50
Hello All,
I have the following DCOUNT statement:
MsgBox "Item count found = " & DCount("[ItemID]", "tblItems", "[ItemID] = [ItemFnd]")
Where ItemID = Primary Key on table tblItems
ItemFnd = a long Integer variable that gets populated programatically, not from the form. It is internal to the function.
I get the following error:
Run-time error '2471'
The expression you entered as a query parameter produced this error: 'The object doesn't contain the Automation object 'ItemFnd."
I can hard code a value and I do not get the error. When I watch the variable I can tell it has a valid value.
Any ideas what I am doing wrong?
Thanks,
I have the following DCOUNT statement:
MsgBox "Item count found = " & DCount("[ItemID]", "tblItems", "[ItemID] = [ItemFnd]")
Where ItemID = Primary Key on table tblItems
ItemFnd = a long Integer variable that gets populated programatically, not from the form. It is internal to the function.
I get the following error:
Run-time error '2471'
The expression you entered as a query parameter produced this error: 'The object doesn't contain the Automation object 'ItemFnd."
I can hard code a value and I do not get the error. When I watch the variable I can tell it has a valid value.
Any ideas what I am doing wrong?
Thanks,