I need to update the Page Caption on a Tab Control in Access. I tried the following code:
Private Sub tabName_AfterUpdate()
MyTabControl.Pages(Me.MyTabControl.Value).Caption = Me.tabName
End Sub
This works well to set the Caption, but after using Tab or Enter in the field and execution of the above code I end up on the next record. What can I do to stay on the same page?
Private Sub tabName_AfterUpdate()
MyTabControl.Pages(Me.MyTabControl.Value).Caption = Me.tabName
Forms!frmMailing.Controls!MyTabControl = Me.MyTabControl.Value
End Sub
leads to the next record as well, while
Private Sub tabName_AfterUpdate()
MyTabControl.Pages(Me.MyTabControl.Value).Caption = Me.tabName
Forms!frmMailing.Controls!MyTabControl = Me.MyTabControl.Value-1
End Sub
Will jump to the previous page of the same record (as expected)!