none
How do I refresh a text box? RRS feed

  • Question

  • Using Access 2003 sp3

    I have a form with a comment (text box) field and a continuous subform with records containing cost data.
    In the cost field of the subform I have an after-update routine that updates the comment field when someone changes a cost value in the subform.

    To do this, in the main form I have a let property to change the contents:

    Property Let update_comment(ByVal new_comment As String)
    Me.comments = new_comment
    End Property

    The thing is, the comment box doesn't display the new information unless I click into it.
    Is there a way to get the comment box to redisplay after the let property changes the contents?

    Thanks in advance for any help.  --Fred

    Monday, December 12, 2016 7:18 PM

Answers

  • I figured it out.

    The underlying data column is 'comments' but the text box on the form is 'txtComments'. Once I changed the code to update the text box instead of the underlying data the update appears immediately.

    • Marked as answer by Fredrated451 Monday, December 12, 2016 11:46 PM
    Monday, December 12, 2016 7:34 PM