I have three tabs which the visible setting is driven off of three other fields one field drives each tab.
I was running into an issue while going through each record where it could not hide a field that had current focus. I noticed this happens when i try to click through records rather quickly. If i click slowly for next record there is no error. I am puzzled. **Nevermind, this seems intermittent and is hard to duplicate the cant hide control on focus. I am out of ideas.
I found a few examples online to set focus to an item on the screen. To which i set focus on one main field outside the tab.
The result is everything is fine however when i click no, which should hide the tab, i get an error you must save the field before you execute the gotocontrol action. run time error 2108
I was running into an issue while going through each record where it could not hide a field that had current focus. I noticed this happens when i try to click through records rather quickly. If i click slowly for next record there is no error. I am puzzled. **Nevermind, this seems intermittent and is hard to duplicate the cant hide control on focus. I am out of ideas.
I found a few examples online to set focus to an item on the screen. To which i set focus on one main field outside the tab.
The result is everything is fine however when i click no, which should hide the tab, i get an error you must save the field before you execute the gotocontrol action. run time error 2108
Code:
Public Function MortgageeFunction()
If Forms!WindOptout!FrameMortgagee = 1 Then
Forms!WindOptout!TabMortgagee.Visible = True
ElseIf Forms!WindOptout!FrameMortgagee = 2 Then
Forms!WindOptout!FrameMortgageeDocument = Null
Forms!WindOptout!FrameMortgageeDocumentOtherIssues = Null
Forms!WindOptout!TextFrameMortgageeDocumentOtherIssuesComment = Null
Forms!WindOptout!TabMortgagee.Visible = False
Forms!WindOptout!PolicyNumber.SetFocus
Else
Forms!WindOptout!PolicyNumber.SetFocus
Forms!WindOptout!TabMortgagee.Visible = False
End If
End Function