From: FatMan on
Hi all:
The code listed below is giving me a “Data Type mismatch in criteria
expression” error.

Code:
Me.txtBinsScanned = DCount("[BatchNum]", "[tblPreSortBatchBackup]",
"[BatchNum]=" & [Forms]![frmTraceBox]![txtBatch])


Where:
BatchNum data type is text

TxtBatch is a text box on my form that is getting its value through a
dlookup function and the results being returned are from a text field from a
different table. It works and the code for it is:

Me.txtBatch = DLookup("[InFriutTransLog]", "[tblIntake]", "[IntakeID]=" &
[Forms]![frmTraceBox]![txtIntakeID])

All help is greatly appreciated.

Thanks,
FatMan