Access VBA Quickie
#1
My boss is learning Access at the moment and he's become stuck on the following problem. I don't really know Access at all well so here we go...
He got 2 combo boxes
The first of which is populated by a db table.
He wants the 2nd one to be populated depending on the selection made in combo box 1.
To me it seems like he needs to pass the selection in the 1st as variable to a query which will then populate combo box 2.
Any ideas? I don't know where to start I must admit!
TIA,
Ian
He got 2 combo boxes
The first of which is populated by a db table.
He wants the 2nd one to be populated depending on the selection made in combo box 1.
To me it seems like he needs to pass the selection in the 1st as variable to a query which will then populate combo box 2.
Any ideas? I don't know where to start I must admit!
TIA,
Ian
#2
You need to point the criteria field for the query of the second combo box at the value of the first combo box.
i.e in criteria field enter Forms!myform.mycombo1.value
You will have to use the Requery method to refresh the second combo control. Put this in the change event of the first combo.
i.e in criteria field enter Forms!myform.mycombo1.value
You will have to use the Requery method to refresh the second combo control. Put this in the change event of the first combo.
Thread
Thread Starter
Forum
Replies
Last Post