
January 21st, 2004, 01:44 PM
|
|
Junior Member
|
|
Join Date: Jan 2004
Location: Stratford, ON
Posts: 1
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
|