Im using the DCount function to check if a record exists in a table. Firstly i set a variable "Item" to a number. Then i use the following code:
DCount("[ItemID]", "OrderIn", "[ItemID] = Item")
The table i want the function to check is called, OrderIn
The field can be any but i have just so happen to have choosen ItemID
The criteria is where ItemID = item (which is a number)
I get an error message saying "The expression you entered as a query perameter produced the following error: 'Item'"
Any ideas why this doesnt work.