Expression in TextBox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
Im trying to create a expression that would count a field by Date and then
between two times and display in a textbox.

For example

The value would be say on the current date(Date) between 11am and
12pm(TimeIn) there were 12 students(Fname)

I know how to count the Fname field in a query but I dont know how to code
the date and time part.

Here is what i have so far =DCount("[Fname]","SignInQry")

Any help would be great.

Thank You
Dave
 
Ok,

I have been playing whith the code and came up with this.
=DCount("[Fname]","SignINQry","[Date]= Date() And [TimeIn] Between_
#09:00:00am# and #11:00:00am# ")

It sort of works, Instead of an #error I get a zero.

I have records for the current date that should display between these times.

Whats wierd if I change the between times to say 9:00:00am to 10:00:00pm. It
says there is one record. If I change it to 9:00:00am to 11:00pm it says
there are 3 records(Which would be the total for the day.)

I have records at 10:11:21am,10:12:42am, and 2:21:41pm
 
try

=DCount("[Fname]","SignINQry","[Date]=#" & Date() & "# And [TimeIn] Between
#09:00:00 AM# and #11:00:00 AM#")

hth


David said:
Ok,

I have been playing whith the code and came up with this.
=DCount("[Fname]","SignINQry","[Date]= Date() And [TimeIn] Between_
#09:00:00am# and #11:00:00am# ")

It sort of works, Instead of an #error I get a zero.

I have records for the current date that should display between these times.

Whats wierd if I change the between times to say 9:00:00am to 10:00:00pm. It
says there is one record. If I change it to 9:00:00am to 11:00pm it says
there are 3 records(Which would be the total for the day.)

I have records at 10:11:21am,10:12:42am, and 2:21:41pm
David said:
Hello,
Im trying to create a expression that would count a field by Date and then
between two times and display in a textbox.

For example

The value would be say on the current date(Date) between 11am and
12pm(TimeIn) there were 12 students(Fname)

I know how to count the Fname field in a query but I dont know how to code
the date and time part.

Here is what i have so far =DCount("[Fname]","SignInQry")

Any help would be great.

Thank You
Dave
 
Back
Top