Can expressions be stored in a table and then displayed on a form in a textbox?
Can expressions be stored in a table and then displayed on a form in a textbox?
(OP)
Hello,
I would like to store some default text in a settings table.
For example I would store: ="Hello" & [FirstName] & " " & "[LastName]"
I was hoping when the record was displayed in a textbox on a form it would give me the result: Hello John Smith
Unfortunately it just shows the value: "Hello" & [FirstName] & " " & "[LastName]"
Is there anyway around this?
Many thanks Mark
I would like to store some default text in a settings table.
For example I would store: ="Hello" & [FirstName] & " " & "[LastName]"
I was hoping when the record was displayed in a textbox on a form it would give me the result: Hello John Smith
Unfortunately it just shows the value: "Hello" & [FirstName] & " " & "[LastName]"
Is there anyway around this?
Many thanks Mark
RE: Can expressions be stored in a table and then displayed on a form in a textbox?
How are you transforming the placeholders into the values you require?
Why aren't you making the value of the form field your concatenation?
Or you could make the column in the table computed
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
RE: Can expressions be stored in a table and then displayed on a form in a textbox?
CODE
ID strCode 1 =Now() 2 =Date() 3 ="The ID is: " & [ID] 4 ="Today is: " & Format(date(),"dddd")
Then on the form I have an unbound textbox called txtbxunbound
On the form's current event I have
CODE
Makes no sense to me, but could be done.
RE: Can expressions be stored in a table and then displayed on a form in a textbox?
However, take the double quotes off "[Lastname]" and save that to a record, assign that record field content as the text box ControlSource - it should work as you intend.
E.g. store EXACTLY this:
CODE
N.B. I've added a space at the end of 'Hello'.
ATB,
Darrylle
Never argue with an idiot, he'll bring you down to his level - then beat you with experience.