David
If you are using a query, then
1. Create a new module with the following code
note field1 is the field currently used to show the time on your
report.
Function format_time(field1)
Dim get_hour As String
Dim get_min As String
Dim time_string As String
get_hour = Hour(field1)
If Len(get_hour) = 1 Then
get_hour = "0" & get_hour
End If
get_min = Minute(field1)
If Len(get_min) = 1 Then
get_min = "0" & get_min
End If
time_string = get_hour & get_min
End Function
If you want to display the time as 09:00 then use this line
time_string = get_hour & ":" & get_min
2. Save the module as mod_format_time or some other suitable name.
3. In your query change the column with the field1 entry to
field2:format_time(field1) where field2 is any name
there is a semicolon : between field2 and format_time
4. Save your changes
5. On your report change the field1 to field2
Allan Murphy
Email:
[email protected]