ok, i need to change the format of certain times
here is my code at the moment, PHV helped me format the date to make 21-21st and 3-3rd etc
now i need to alter the time format
in my db, the time is in two fields.. hours and minutes
infact, you can see the form here..
http://www.londonheathrowcars.com/taxi-booking.asp
i am dealing with the pickup time..
in my db i need to change
1PM to 13
1AM to 01
Midday to 12
Midnight to 24
etc..
can anyone suggest a method
here is the code that emails the fields to my customer
London Heathrow Cars
here is my code at the moment, PHV helped me format the date to make 21-21st and 3-3rd etc
now i need to alter the time format
in my db, the time is in two fields.. hours and minutes
infact, you can see the form here..
http://www.londonheathrowcars.com/taxi-booking.asp
i am dealing with the pickup time..
in my db i need to change
1PM to 13
1AM to 01
Midday to 12
Midnight to 24
etc..
can anyone suggest a method
here is the code that emails the fields to my customer
Code:
Option Compare Database
Private Sub emailbutton_Click()
On Error GoTo send_Err
Dim strToWhom As String
Dim strMsgBody As String
Dim strSubject As String
Dim temp As Integer
temp = Right([jobday], 1)
strSubject = "London Heathrow Cars - Booking Confirmation"
If Len(Me.emailadd & vbNullString) = 0 Then
MsgBox ("Forgot an email address")
Me.emailadd.SetFocus
Else
strToWhom = Me.emailadd
strMsgBody = "FAO " & Me.title & " " & Me.myname & vbCrLf & vbCrLf & _
"Thank you for your booking request via our website. Details of the requested transfer and our fare are as follows:" & vbCrLf & vbCrLf & _
"Job Date: " & Me.jobday & Nz(Choose(IIf(Me.jobday < 21, Me.jobday, Me.jobday Mod 10), "st", "nd", "rd"), "th") & " " & Me.jobmonth & " " & Me.jobyear & vbCrLf & _
"Job Time: " & Me.jobhour & " " & Me.jobminutes & " hrs" & vbCrLf & vbCrLf & _
"Pickup From: " & Me.padd & vbCrLf & vbCrLf & _
"Destination: " & Me.dadd & vbCrLf & vbCrLf & _
"Price: £" & Me.price & vbCrLf & vbCrLf & _
"All of our drivers are courteous, experienced and smartly presented. Our vehicles are clean, modern, comfortable and fitted with satellite navigation technology for you peace of mind."
DoCmd.SendObject , , , strToWhom, , , strSubject, strMsgBody, True
End If
send_Err:
If Err.Number = 2501 Then
MsgBox "THIS EMAIL HAS NOT BEEN SENT!", vbInformation, "Notice!"
End If
End Sub
London Heathrow Cars