F
Fred
Hi,
I have a parking database that I need to send emails out to people once
they have been assigned a parking spot. I have 3 different types of
parking (handicap, VIP and Regular).
The problem is I have 2 check boxes one for VIP and 1 for handicap and
I have written my code as follows:
'***creates an instance of Outlook
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
FollowHyperlink "mailto:" & Me.Email.Value
If Me!VIP = 0 Then
'***creates and sends email
With objEmail
.To = Email
.CC = "(e-mail address removed)"
.Subject = ref & "Suffolk Visitor Parking " & origin & " " &
destination
.Body = "Parking for " & Me.[First Name] & " " & Me.[Last Name] & "
is confirmed. Please park in spaces 663-672 If these parking spaces are
full find a open space to park Thank You"
.Send
End With
End If
If Me!VIP = -1 Then
'***creates and sends email
With objEmail
.To = Email
.CC = "(e-mail address removed)"
.Subject = ref & "Suffolk Visitor Parking " & origin & " " &
destination
.Body = "Parking for " & Me.[First Name] & " " & Me.[Last Name] & "
is confirmed. Please park in space 662 Thank You"
.Send
End With
End If
If Me!Handicap = -1 Then
'***creates and sends email
With objEmail
.To = Email
.CC = "(e-mail address removed)"
.Subject = ref & "Suffolk Visitor Parking " & origin & " " &
destination
.Body = "Parking for " & Me.[First Name] & " " & Me.[Last Name] & "
is confirmed. Please park in Handicap spaces 135 or 136 Thank You"
.Send
End With
End If
When I do this if I check handicap it does not recognize the check box
and go to the third email it treats it like a regular and throws an
error. Thanx for anyhelp you can provide
I have a parking database that I need to send emails out to people once
they have been assigned a parking spot. I have 3 different types of
parking (handicap, VIP and Regular).
The problem is I have 2 check boxes one for VIP and 1 for handicap and
I have written my code as follows:
'***creates an instance of Outlook
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
FollowHyperlink "mailto:" & Me.Email.Value
If Me!VIP = 0 Then
'***creates and sends email
With objEmail
.To = Email
.CC = "(e-mail address removed)"
.Subject = ref & "Suffolk Visitor Parking " & origin & " " &
destination
.Body = "Parking for " & Me.[First Name] & " " & Me.[Last Name] & "
is confirmed. Please park in spaces 663-672 If these parking spaces are
full find a open space to park Thank You"
.Send
End With
End If
If Me!VIP = -1 Then
'***creates and sends email
With objEmail
.To = Email
.CC = "(e-mail address removed)"
.Subject = ref & "Suffolk Visitor Parking " & origin & " " &
destination
.Body = "Parking for " & Me.[First Name] & " " & Me.[Last Name] & "
is confirmed. Please park in space 662 Thank You"
.Send
End With
End If
If Me!Handicap = -1 Then
'***creates and sends email
With objEmail
.To = Email
.CC = "(e-mail address removed)"
.Subject = ref & "Suffolk Visitor Parking " & origin & " " &
destination
.Body = "Parking for " & Me.[First Name] & " " & Me.[Last Name] & "
is confirmed. Please park in Handicap spaces 135 or 136 Thank You"
.Send
End With
End If
When I do this if I check handicap it does not recognize the check box
and go to the third email it treats it like a regular and throws an
error. Thanx for anyhelp you can provide