C
Craig
I have managed to get many strings to work but having following with the
following code:
Dim strA as string
Dim strMessage as string
Dim strLine as string
If Me.Text = "Yes" then
strA = "True"
Else
strA="False"
End If
So now, if I use a text statement from a table (tblText), where the ID = 1
"Hello world, this statement is " & strA
and call this within the module
strMessage = DLookup("Statement","tblText","ID = 1")
strLine = Eval(strMessage)
debug.Print strLine
I get an error: Run-time error '2482' application can't find the name
"strA" you entered in the expression.
The problem here is, that it will not call the value for strA. Is there a
way to get this data into the string. Combine the module and the text.
What I am trying to achieve here is, editable emails. I have a database
that produces emails templates based on the criteria entered into the client
form and calls data throughout the email. It is currently hard coded into
the module with a mixture of VBA to call the data and HTML to write/format
the email. The only way to update the template is to edit the module code,
which is only available by the one programmer.
If I can place the text (body of the email) into a table, then I can assign
users to update the email text.
Any help would be greatly appreciated
following code:
Dim strA as string
Dim strMessage as string
Dim strLine as string
If Me.Text = "Yes" then
strA = "True"
Else
strA="False"
End If
So now, if I use a text statement from a table (tblText), where the ID = 1
"Hello world, this statement is " & strA
and call this within the module
strMessage = DLookup("Statement","tblText","ID = 1")
strLine = Eval(strMessage)
debug.Print strLine
I get an error: Run-time error '2482' application can't find the name
"strA" you entered in the expression.
The problem here is, that it will not call the value for strA. Is there a
way to get this data into the string. Combine the module and the text.
What I am trying to achieve here is, editable emails. I have a database
that produces emails templates based on the criteria entered into the client
form and calls data throughout the email. It is currently hard coded into
the module with a mixture of VBA to call the data and HTML to write/format
the email. The only way to update the template is to edit the module code,
which is only available by the one programmer.
If I can place the text (body of the email) into a table, then I can assign
users to update the email text.
Any help would be greatly appreciated