totalnovice2
Registered User.
- Local time
- Today, 13:21
- Joined
- May 21, 2013
- Messages
- 36
Hi.
I have the following code which works perfectly BUT I want to be able to add another line of text if users enable a checkbox. I have tried everything I can think of but can't get it to work. When using an "IF check150" statement it just adds the extra text in regardless of selection or not.
This is fine most of the time but
If a user ticks check150 I want to add another paragraph.
Do I use an IF statement, if so in what format? is it a separate function etc?
I am slowly getting more familiar with Access but still come unstuck on the simplest of things at times.
I have the following code which works perfectly BUT I want to be able to add another line of text if users enable a checkbox. I have tried everything I can think of but can't get it to work. When using an "IF check150" statement it just adds the extra text in regardless of selection or not.
Code:
Function Mail_Radio_Outlook6(activedoc As String)
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim acc_req As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Hello.<br> <br> Please Find attached request for access. <br>"
acc_req = "Orange / T-Mobile" & " " & [Forms]![Front Page]![Text98].Value & " " & " " & Forms![Front Page]![Site 2 Name].Value
With OutMail
On Error Resume Next
.Display
.To = [EMAIL="example@example.com"]example@example.com[/EMAIL]
.CC = ""
.Subject = acc_req
.Attachments.Add (activedoc)
.HTMLBody = strbody & "<br>" & .HTMLBody
.Display
End With
End Function
This is fine most of the time but
If a user ticks check150 I want to add another paragraph.
Do I use an IF statement, if so in what format? is it a separate function etc?
I am slowly getting more familiar with Access but still come unstuck on the simplest of things at times.