Hello,
I am totally new to Access 2010 and inexperienced.
I am trying to write code for an After Update event on a combo box (called Combo21 in my application) that will automatically supply a parameter to a parameter query based on the selection that the user makes in the combo box. The name of the query is qryUserPssPull and the parameter is enteruser.
I have written this for the After Update event:
Option Compare Database
Private Sub Combo21_AfterUpdate()
Dim userSelection As String
userSelection = Combo21.Text
DoCmd.SetParameter "enteruser", userSelection
DoCmd.OpenQuery "qryUserPssPull"
End Sub
But when I try to run it the error message I get is this:
Run-time Error '2766':
The Object doesn't contain the Automation Object, "Thomas."
(The combo box options are a list of employee names of which Thomas xxxxx is one. If I select a different employee name from the drop down list, I get the same message except with his/her name appearing in the error message.)
I apologize for the fact that this code probably demonstrates I am not too good at this...I am very much still learning.
I hugely appreciate any assistance offered. THANKS.