Populating a text box based on a button

  • Thread starter Thread starter adf
  • Start date Start date
A

adf

I have a form, I would like the user to be able to open a record and press a button on the form which would then "put" a predefined string into the "comments" field of that record, which is displayed as a text box.

I tried using comments.text = "This is my comment" in the Button's click event, but got an error stating that the textbox needed to have focus or something for this to work.

Any ideas?
 
Set the focus prior to entering the text.
Put
Me.Textboxname.SetFocus
Me.Textboxname.Text = "This is the Comment"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top