I need to navigate from one tab to another tab depending upon results of some If/Else code to edit combo box data. Here is the code that works to produce an error message if a user has made an invalid selection. When the msgbox pops up and the user enters ok, how can I display the correct tab for the user to enter data?
This part of the code works (thanks to lagbolt!).
If DCount("*", "Operational Review Findings", "Client = '" & Me.Client & "' AND Category = '" & Me.Category & "'") > 0 Then
cancel = True
Category.BorderColor = vbRed
MsgBox "Duplicate Record - Select the Edit Findings tab to change input for this category."
If the MsgBox pops up, the focus needs to move from Tab1 to Tab2. Can someone help me with the code to handle this?
Thank you!
This part of the code works (thanks to lagbolt!).
If DCount("*", "Operational Review Findings", "Client = '" & Me.Client & "' AND Category = '" & Me.Category & "'") > 0 Then
cancel = True
Category.BorderColor = vbRed
MsgBox "Duplicate Record - Select the Edit Findings tab to change input for this category."
If the MsgBox pops up, the focus needs to move from Tab1 to Tab2. Can someone help me with the code to handle this?
Thank you!