Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time of Day in DCount Criteria

Status
Not open for further replies.

Murphette

Technical User
Jun 17, 2005
10
US
I frequently use form controls that have DCount expressions as their control source, but this has me stuck. This returns an error message no matter how I edit the syntax: =DCount("StaffID","qryCPRDates","TOD = '7:30 AM'")

This control is supposed to show how many staff have registered for the 7:30AM CPR class. The field in the underlying table is TOD (time of day) and it is in medium time format. Any suggestions? Is my syntax off? Do need to convert TOD to a text string?

Any help is greatly appreciated.
 
The light has dawned...I forgot to format time as time. TOD = #7:30:00 AM# worked nicely.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top