Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / March 2005

Tip: Looking for answers? Try searching our database.

Counting Values In Reports

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Seikyo - 16 Mar 2005 10:11 GMT
How to declare the syntax when my [SCHD_START] are in Date/Time Field. For
example, #01/01/2005 12:00:00 PM#.  I just can't compare the values to get
the results I want.  I got a separate field [DateEntered] which contain
solely the Date only. For example, #01/01/2005#. is it possible to use it to
fill up the time field in [SCHD_START]?

My Syntax:-
=Sum(IIf([SCHD_START]>=#12:00:00 PM# And ([SCHD_START]<#6:00:00 PM#),1,0))
Signature

Seikyo

Duane Hookom - 16 Mar 2005 15:12 GMT
You can get only the Time part of the date/time by using
TimeValue([SCHD_START]).

Signature

Duane Hookom
MS Access MVP
--

> How to declare the syntax when my [SCHD_START] are in Date/Time Field. For
> example, #01/01/2005 12:00:00 PM#.  I just can't compare the values to get
[quoted text clipped - 5 lines]
> My Syntax:-
> =Sum(IIf([SCHD_START]>=#12:00:00 PM# And ([SCHD_START]<#6:00:00 PM#),1,0))
Seikyo - 17 Mar 2005 02:27 GMT
I do a timevalue to it but the response I get is saying the function too
complex in the reports.

=Sum(IIf(TimeValue([SCHD_START])>=#12:00:00 PM#,1,0))

> You can get only the Time part of the date/time by using
> TimeValue([SCHD_START]).
[quoted text clipped - 8 lines]
> > My Syntax:-
> > =Sum(IIf([SCHD_START]>=#12:00:00 PM# And ([SCHD_START]<#6:00:00 PM#),1,0))
Seikyo - 17 Mar 2005 03:41 GMT
I find another way to do it.  I used DatePart instead to compare the hour.
Think this is much more easier to compare with. :-)

=Sum(IIf(DatePart("h",[SCHD_START])>=12 And
DatePart("h",[SCHD_START])<18,1,0))
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.