In MS Access 2016 I am trying populate a text box on a form, when someone clicks a button on the form.
The button, Command9 - I have set the OnClick event to [Event Procedure], which then created the following:
Private Sub Command9_Click()
End Sub
I added:
Private Sub Command9_Click()
Me(Field1) = "hello"
End Sub
I also tried:
Private Sub Command9_Click()
Field1.text = "hello"
End Sub
I get the error:
You can't reference a property or method for a control unless the control has the focus
.Value
vs.text
– Napoli