Set the value of a text box with VBA

  • Thread starter Thread starter R Meyer
  • Start date Start date
R

R Meyer

I am trying to display the record count value of a recordset ran in VBA in a
text box on a form, however, I have been unable to get the result to display
after the form is open. If I stop the code before the form opens, while it
still in design view, the values are in the textboxes. I have tried assigning
the value to the Control Source, the Default Value, and to the Text value
(have not been successful with that). Please assist if possible.
 
R Meyer said:
I am trying to display the record count value of a recordset ran in VBA in
a
text box on a form, however, I have been unable to get the result to
display
after the form is open. If I stop the code before the form opens, while it
still in design view, the values are in the textboxes. I have tried
assigning
the value to the Control Source, the Default Value, and to the Text value
(have not been successful with that). Please assist if possible.


Try the Value property ....

Me.NameOfTextBox.Value = etc

As the Value property is the default property of an Access text box, you can
optionally leave out the explicit reference to the value property ...

Me.NameOfTextBox = etc
 
Back
Top