SMS Message text (1 Viewer)

Stroud1977

Registered User.
Local time
Today, 23:30
Joined
Nov 30, 2013
Messages
45
Hi, Thanks to your help I've now got my database firing off SMS text messages with no problems.

The only thing I'd like to improve would be the body of the text.

Right now my code for my message is

Message = "Hi"

I'd like to incorporate some fields to speed things up so I could have things like..

Message = "Hi" [Customer Name]"Thanks for your booking on [Booking Date] etc etc...

As I'm a newbie to Access and code in general, I can't get this to run without error. Does anyone know the correct code format to achieve this? Many thanks!

Steve
 

AlexHedley

Registered User.
Local time
Today, 23:30
Joined
Aug 28, 2012
Messages
171
You need to do string concatenation.

Use the "&" to join Strings and Variables/Fields/Controls

Code:
Dim strMessage As String
strMessage = "Hi " & [Forms]![frmFORMNAME]![FIELDNAME] & " more words"
 

AlexHedley

Registered User.
Local time
Today, 23:30
Joined
Aug 28, 2012
Messages
171
Message = "Hi" [Customer Name]"Thanks for your booking on [Booking Date] etc etc...


Code:
Message = "Hi" & [Customer Name] & "Thanks for your booking on " & [Booking Date] & "etc etc..."
 

Stroud1977

Registered User.
Local time
Today, 23:30
Joined
Nov 30, 2013
Messages
45
Code:
Message = "Hi" & [Customer Name] & "Thanks for your booking on " & [Booking Date] & "etc etc..."

Hi Alex, Thanks so much for this! This was exactly what I needed. I really appreciate your help.

Cheers

Steve
 

Users who are viewing this thread

Top Bottom