We have a form to track services provided. The goal is to have the focus sent from one sub form to another if certain entries are choosen from a combo field. The code we are using is below. We are able to receive the info message, but the focus remains on the combo box.
If this is not possible, can someone give me any ideas on validating a subform when main form closes.
Private Sub Service_Result_Desc_AfterUpdate()
If Me.Service_Result_Desc = "ID Job Vacancies" Then
MsgBox "ID Job Vacancies was selected. You must enter an OES Information.", vbInformation
[Forms]![frm_Services2]![frm_ServicesNewOES]![OES_Code].SetFocus
ElseIf Me.Service_Result_Desc = "Consumer Hired" Then
MsgBox "Consumer Hired was selected. You must enter Client Information.", vbInformation
[Forms]![frm_Services2]![frm_ClientInfo]![ClientID].SetFocus
End If
End Sub
Thanks,
Z
If this is not possible, can someone give me any ideas on validating a subform when main form closes.
Private Sub Service_Result_Desc_AfterUpdate()
If Me.Service_Result_Desc = "ID Job Vacancies" Then
MsgBox "ID Job Vacancies was selected. You must enter an OES Information.", vbInformation
[Forms]![frm_Services2]![frm_ServicesNewOES]![OES_Code].SetFocus
ElseIf Me.Service_Result_Desc = "Consumer Hired" Then
MsgBox "Consumer Hired was selected. You must enter Client Information.", vbInformation
[Forms]![frm_Services2]![frm_ClientInfo]![ClientID].SetFocus
End If
End Sub
Thanks,
Z