Greetings All,
I have a main form (frmTrk) and there is a combo box (cboTrk) along with other controls in this form.
frmTrk has an UNBOUND sub form (subfrmTrk) as continous form, which shows record from a query. On this continous form has an unbound text box shows "Click & Schedule" which opens a form related to the PK on this sub form. Everything works here.
The problem is, when user click on "Click & Schedule", VBA has an IF statement that check whether 'cboTrk' has a value or not. If no value has selected, then SetFocus to this combo box (cboTrk).
I have tried different variance of SetFocus method, but none of them works.
Forms!frmTrk.SetFocus
Forms!frmTrk.cboTrk.SetFocus
No results. Access doesn't show any errors, the control is not setfocus.
I have just tried: Forms!frmTrk.cboTrk.SetFocus - same result, no focus.
I don't know what to do? Is that because both are not parent/child forms?
I have a main form (frmTrk) and there is a combo box (cboTrk) along with other controls in this form.
frmTrk has an UNBOUND sub form (subfrmTrk) as continous form, which shows record from a query. On this continous form has an unbound text box shows "Click & Schedule" which opens a form related to the PK on this sub form. Everything works here.
The problem is, when user click on "Click & Schedule", VBA has an IF statement that check whether 'cboTrk' has a value or not. If no value has selected, then SetFocus to this combo box (cboTrk).
I have tried different variance of SetFocus method, but none of them works.
Forms!frmTrk.SetFocus
Forms!frmTrk.cboTrk.SetFocus
No results. Access doesn't show any errors, the control is not setfocus.
I have just tried: Forms!frmTrk.cboTrk.SetFocus - same result, no focus.
I don't know what to do? Is that because both are not parent/child forms?