Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
dcount的Instade我将使用DLookup
DLookup("FieldName" , "TableName" , "Criteria= #date#")
但是要使用您的代码,您必须这样做:
If DCount("Date", "ScadaHourly", "Date = " & CDATE(date1)) > 0 Then MsgBox "User Name Found!" Else MsgBox "User Name Not Found!" End If