Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 21st, 2004, 01:44 PM
ckornaker ckornaker is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Stratford, ON
Posts: 1 ckornaker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
MS Access - Date & Time From/To Record Display in Report

I have created a Help Desk Call Log database. When a call is entered into the main form the current date and time is automatically filled in and put into two columns in the main table.
I have a reporting form in which the user can select from quite a few different reports. They can also select the date they want to report on. I have now been requested to add a time field for reporting. So - the user can select the from date AND time and the To date AND time to report on.
I cannot figure out how to add the time to my script to get this to work.

This is part of my existing VB script:

Dim stDocName As String
Dim stDocWhere As String

' select report and date/filtering controls
If [RepSelected] = 1 Then
stDocName = "VPO"
stDocWhere = "[Date] >= Forms!Report!FromDate And [Date]<= Forms!Report.ToDate"
endif
' do the report
DoCmd.OpenReport stDocName, acPreview, , stDocWhere

Reply With Quote
  #2  
Old August 5th, 2004, 05:26 AM
sherrington sherrington is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 85 sherrington User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 4 m 52 sec
Reputation Power: 5
I would suggest adding time from/to fields to the calling form, and then combining the time and date fields into a single datetime, which is then used as the parameter.

I would then use the full datetime functionality in the table and have a single datetime field. Alternatively, combine the existing two fields in the query to form a single datetime field

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > MS Access - Date & Time From/To Record Display in Report


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT