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
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
Textbox Text51 is locked, set property Locked to False.