Text box message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form and a text box which is used to display a message like "Please enter the Invoice Number for the Order 1234". The order number 1234 is a variable from a table. I know if in a message box I can concantate a variable. Is it possible I can do the same here ? Or any good suggestion

Thank
 
I have a form and a text box which is used to display a message like
"Please enter the Invoice Number for the Order 1234". The order
number 1234 is a variable from a table. I know if in a message
box I can concantate a variable. Is it possible I can do the same
here ? Or any good suggestion?

Thanks

Where do you get the OrderNumber from?
On this Form? Via Code? On some other open Form?

If the order number is included in a field on that form....
as control source in an unbound text control on the form:
= "Please enter the Invoice Number for the Order " &
Me![OrderNumberField]

From a control on some other Form that is open ....
= "Please enter the Invoice Number for the Order " &
forms!FormName![OrderNumberField]

Via Code using a variable ....
DoCmd.OpenForm "FormName", , , , , acDialog
forms!FormName!ControlName = "Please enter the Invoice Number for the
Order " & VariableName
 
The Order Number can come from another form or from the form record source. But the message I want to display is a Text Box. So the only place I can enter the message is the Caption. My understanding of Caption is that it just displays what ever is entered.
 
The Order Number can come from another form or from the form record
source. But the message I want to display is a Text Box. So the
only place I can enter the message is the Caption. My
understanding of Caption is that it just displays what ever is
entered.

The only thing we have to go on is what you say, not what you mean.
A Text Box control does not have a caption property.
A Label control does.

To write your text into a Text control, you do it exactly as I posted.
To write text into a Label control's Caption you would write, in VBA
code:
LabelName.Caption = "Your Text " & [SomeVariable]
 
Back
Top