I have written some code below to count if the SQL query I want to run has any records in it so I can use it in an if statement but can't get it to work.
Dim lRecCount As Long
lRecCount = DCount("autonumber", "Select_Unselected_StockWIP", "(((Estimate_ID) = '" & Me.EstimateNo & "' And (Status)=0)")
I get this error message:
Does anyone know what I am doing wrong?