Hi,
I know how to do a dcount on a table to get a record count and display that. However, I want to get a record count from a query and display that instead. Not sure what I'm doing wrong (always comes up blank):
I know how to do a dcount on a table to get a record count and display that. However, I want to get a record count from a query and display that instead. Not sure what I'm doing wrong (always comes up blank):
Code:
strSQL = "SELECT "
strSQL = strSQL & "COUNT(tmp.Rec_ID) AS Records"
strSQL = strSQL & " FROM tmpExcelUpload tmp INNER JOIN Data D ON tmp.[Site ID] = D.[Site ID]"
With Forms![TabMenu]![Maintenance].Form![ExcelUploadResults].Form
![LabelDupSiteIDs].Caption = Records & " Record(s)that have the same Site ID already exist "
End With