MSAccess - populate text box with value from query

前端 未结 2 1807
太阳男子
太阳男子 2021-01-27 06:37

I have a combo box and several text boxes on a form. When I select a value from the combo box I want it to run a query based on that value and populate the text boxes with the d

相关标签:
2条回答
  • 2021-01-27 07:21

    There is no need to do this:

    Me.Text51.SetFocus
    Me.Text51.Text = location
    

    it is true that the text property is only available when the control has the focus, but the value property is available without any focus, or Access VBA is quite happy with just the name of the control:

    Me.Text51.Value = location
    

    Or

    Me.Text51 = location
    
    0 讨论(0)
  • 2021-01-27 07:24

    Textbox Text51 is locked, set property Locked to False.

    0 讨论(0)
提交回复
热议问题