R
Rob W
Greetings,
I have combo box and a sub form that appears after updates/click of combo
box.
I have a clear button on the form which runs the following code:-
Private Sub cmdClear_Click()
Me.cboModuleName.SetFocus
Me.cboModuleName.Text = ""
Me.frmModuleResultsSubform.Enabled = False
Me.frmModuleResultsSubform.Visible = False
End Sub
It wont let me change the subform because apparently you cant disable a
control while it has focus.
I also had to set the focus to the subform manually (see below) as It only
allowed me to tab through field on the main form, this ONLY happens if i
used the CLEAR button else the focus goes to the subform even if there are
no rows, and allows data entry.
Private Sub cboModuleName_Click()
Me.frmModuleResultsSubform.Enabled = True
Me.frmModuleResultsSubform.Visible = True
Me.frmModuleResultsSubform.SetFocus
Me.frmModuleResultsSubform.Requery
End Sub
Can anyone think of an easer way, to have a clear button that clears combo
box and the sub form?
Thanks
Rob
I have combo box and a sub form that appears after updates/click of combo
box.
I have a clear button on the form which runs the following code:-
Private Sub cmdClear_Click()
Me.cboModuleName.SetFocus
Me.cboModuleName.Text = ""
Me.frmModuleResultsSubform.Enabled = False
Me.frmModuleResultsSubform.Visible = False
End Sub
It wont let me change the subform because apparently you cant disable a
control while it has focus.
I also had to set the focus to the subform manually (see below) as It only
allowed me to tab through field on the main form, this ONLY happens if i
used the CLEAR button else the focus goes to the subform even if there are
no rows, and allows data entry.
Private Sub cboModuleName_Click()
Me.frmModuleResultsSubform.Enabled = True
Me.frmModuleResultsSubform.Visible = True
Me.frmModuleResultsSubform.SetFocus
Me.frmModuleResultsSubform.Requery
End Sub
Can anyone think of an easer way, to have a clear button that clears combo
box and the sub form?
Thanks
Rob