I have a tab control placed on my main form. The tabcontrol name is TabCtl and it has four pages.
When I move from Page 2 to page 3, on the TabCtl change event the following code runs:
If StR < 0 And check <> 1 Then
intMFResponse = MsgBox("Changes made to the data will result in NEGATIVE Values. Do you want to continue?", vbYesNo, "ALERT!")
If intMFResponse = vbYes Then
check = 1
GoTo Line2
ElseIf intMFResponse = vbNo Then
Forms![IOSForm]![TabCtl].Value = False
Exit Sub
End If
I do won't want to see Page 3 unless I say "Yes" to the msgbox prompt. But it takes me to page3 before I hit "yes" on the message box. Secondly if I select "No" on the message box, it takes me back to Page 1 but I like to be on Page 2: the page I was on before I tried to move to page3.
I have tried several different ways to get it working but it's not working. Any suggestions/ideas ? Thanks a lot in advance
Jay
When I move from Page 2 to page 3, on the TabCtl change event the following code runs:
If StR < 0 And check <> 1 Then
intMFResponse = MsgBox("Changes made to the data will result in NEGATIVE Values. Do you want to continue?", vbYesNo, "ALERT!")
If intMFResponse = vbYes Then
check = 1
GoTo Line2
ElseIf intMFResponse = vbNo Then
Forms![IOSForm]![TabCtl].Value = False
Exit Sub
End If
I do won't want to see Page 3 unless I say "Yes" to the msgbox prompt. But it takes me to page3 before I hit "yes" on the message box. Secondly if I select "No" on the message box, it takes me back to Page 1 but I like to be on Page 2: the page I was on before I tried to move to page3.
I have tried several different ways to get it working but it's not working. Any suggestions/ideas ? Thanks a lot in advance
Jay