Hi,
I wonder if anyone can help.
I have a unbound form, with an Unbound combo box giving me a list of numbers.
I also have 3 sub forms based on queries, in the criteria is the combo box value.
Each time the combo box is change I requery the sub forms and the data changes which is fine.
But, there are 30 items in the combo box & at the moment I select each Item then print the form (which gets tiresome).
So, I would like a procedure that goes through each Item in the combo box and print the form.
I went through the help and thought I could use a procedure something like the one below but getting an error 'Object Doesn't Support This Property or Method'.
Please Help.
Dim ctlList As Control, varItem As Variant
Set ctlList = Forms!frmControlTotals!cmbGroup
For Each varItem In ctlList
Debug.Print ctlList.ItemData(varItem)
Next varItem
I wonder if anyone can help.
I have a unbound form, with an Unbound combo box giving me a list of numbers.
I also have 3 sub forms based on queries, in the criteria is the combo box value.
Each time the combo box is change I requery the sub forms and the data changes which is fine.
But, there are 30 items in the combo box & at the moment I select each Item then print the form (which gets tiresome).
So, I would like a procedure that goes through each Item in the combo box and print the form.
I went through the help and thought I could use a procedure something like the one below but getting an error 'Object Doesn't Support This Property or Method'.
Please Help.
Dim ctlList As Control, varItem As Variant
Set ctlList = Forms!frmControlTotals!cmbGroup
For Each varItem In ctlList
Debug.Print ctlList.ItemData(varItem)
Next varItem