dellehurley
Board Regular
- Joined
- Sep 26, 2009
- Messages
- 171
- Office Version
- 365
- Platform
- Windows
Sorry my header is probably confusing, I was not sure how to summarise my query.
I have a form in access with a 49 combo boxes which I have named cmbFullName1, cmbFullName2, cmbFullName3, cmbFullName4 etc
I know I can refer to them like this in the code...
But can I create a private sub procedure for the form to cover all of the combo boxes or do I have to create a change event for each one?
instead of this...
I want to do something like this
is this possible?
Dannielle
I have a form in access with a 49 combo boxes which I have named cmbFullName1, cmbFullName2, cmbFullName3, cmbFullName4 etc
I know I can refer to them like this in the code...
VBA Code:
For i = 1 To PplCnt
.Controls("cmbFullName" & i).Visible = True
.Controls("cmbRIN" & i).Visible = True
.Controls("txtRec" & i).Visible = True
.Controls("lblFullName" & i).Visible = True
.Controls("lblRIN" & i).Visible = True
instead of this...
VBA Code:
Private Sub cmbFullName1_Change()
Private Sub cmbFullName2_Change()
Private Sub cmbFullName3_Change()
Private Sub cmbFullName4_Change()
I want to do something like this
VBA Code:
Private Sub cmbFullName & i_Change()
is this possible?
Dannielle