G
Guest
I have a subform (sfStaffList_DataEntry) inside another subform
(sfCompanyFile). I'd like to click a command button (cbCancelAddNewStaff) in
sfStaffList_DataEntry and set focus back to a Originator combo box in
sfCompanyFile and hide sfStaffList_DataEntry.
I attempted with the code below, but it didn't work. Can anyone please help?
Many thanks
Private Sub cbCancelAddNewStaff_Click()
' Set focus back to Originator combo box in sfCompanyFile
Originator.SetFocus
' Hide sfStaffList_DataEntry
sfStaffList_DataEntry.Visible = False
End Sub
(sfCompanyFile). I'd like to click a command button (cbCancelAddNewStaff) in
sfStaffList_DataEntry and set focus back to a Originator combo box in
sfCompanyFile and hide sfStaffList_DataEntry.
I attempted with the code below, but it didn't work. Can anyone please help?
Many thanks
Private Sub cbCancelAddNewStaff_Click()
' Set focus back to Originator combo box in sfCompanyFile
Originator.SetFocus
' Hide sfStaffList_DataEntry
sfStaffList_DataEntry.Visible = False
End Sub