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 / January 2007

Tip: Looking for answers? Try searching our database.

print reports

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gostap - 05 Jan 2007 14:15 GMT
Hi;

Probably a stupid question from a newbie;
I have a form with several test results taken during a 24-hour priod.
Each test has a field with time format like this: yyyy-mm-dd hh:mm. (not
primary key)
I want to print a report based on the data in to modes.
First one, specified by one particular time e.g. 2006-12-19 22:37.
That’s no problem. next one, I want to print out every report during one 24-
hour period.
e.g.     2006-12-20 06:30
    2006-12-20 15:32
    2006-12-20 71:15

i.e. all report chosen by a specific date without any consideration to the
time. I understand I have to format date somehow in VB but how? it will not
work for me.

hope somebody have mercy 

Best Regards

Gostap
strive4peace - 11 Jan 2007 08:52 GMT
Hi Gostap,

the OpenReport action has a very useful parameter that allows you to
specify a WHERE clause...

the generic syntax is

DoCmd.OpenReport ReportName, View, FilterName, WhereCondition,
WindowMode, OpenArgs

and, here are some examples:

~~~~~~~~~~
Dim mWhere as string
mWhere = "TestDate >=#12/19/06 22:30# " _
   & " AND TestDate <#12/20/06 22:30#"
DoCmd.OpenReport "ReportName", acViewPreview, , mWhere
~~~~~~~~~~~
Dim mWhere as string
mWhere = "DateValue(TestDate)=#12/19/06#"
DoCmd.OpenReport "ReportName", acViewPreview, , mWhere

~~~~~~~~~~~

you can, of course, build the mWhere string instead of literally
specifying it...

If you are using another date format than American, look at this link:

International Dates in Access - Allen Browne
http://allenbrowne.com/ser-36.html

Warm Regards,
Crystal
 *
     (:  have an awesome day  :)
  *
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
  *

> Hi;
>
[quoted text clipped - 19 lines]
>
> Gostap
Gostap - 11 Jan 2007 10:27 GMT
Dear Chrystal

Thank you very much for kind reply!

best Regards

Gostap

>Hi Gostap,
>
[quoted text clipped - 43 lines]
>>
>> Gostap
strive4peace - 12 Jan 2007 10:13 GMT
you're welcome, Gostap ;)  happy to help

Warm Regards,
Crystal
 *
     (:  have an awesome day  :)
  *
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
  *

> Dear Chrystal
>
[quoted text clipped - 50 lines]
>> [quoted text clipped - 19 lines]
>>> Gostap
 
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.