Good afternoon Im hoping you can help.

Im trying to get my head around using ADO connection in VBA for excel and really strulling to get my head around it. I have a stored procedure in Access and a parameter variable.

What I need to have is: (In an excel user form).
When Combobox1 changes - I need the text in combobox 1 to run the Access query. and the returns of this to be a list in combobox2.

Im wondering if someone can help write something quite simple for me to understand so I can manipulate the code to my uses then I can get my head around using this in the future.


FYI:
the stored query name is handlerbydept
Using ACE.OLEDB.12.0
Combobox1 and combobox2 are named just that for now.



Ive tried to write my own but clearly missing various things as i get compile errors etc and im sure im missing very simple parts. Ive looked up other codes but dont get what's where to be able to manipulate it.


Many thanks