D
Diamonds_Mine
I have a form that contains a multipage control with 4 pages; there are also
4 buttons on the form "Cancel", "Previous", "Next" and "Finish. I'd like to
know how to code the Previous and Next buttons so that they are
enabled/disabled when appropriate. I used the code below, but it disables
the "Next" button after one click and also with the "previous" button. I'd
like the "Next" button to be enabled on pages 1 thru 3 and disabled on page
4; I'd like the "Previous" button to be enabled on pages 2-4 and disabled on
page 1. Thank you for any help that you can provide.
Private Sub cmdNext_Click()
Select Case mpgTab.Value
Case 0 'on General Page
mpgTab.Value = 1
cmdPrevious.Enabled = True
cmdNext.Enabled = False
cmdFinish.Default = True
End Select
End Sub
Sub cmdPrevious_Click()
Select Case mpgTab.Value
Case 1
mpgTab.Value = 0
cmdPrevious.Enabled = False
cmdNext.Enabled = True
cmdNext.Default = True
cmdFinish.Default = False
End Select
End Sub
4 buttons on the form "Cancel", "Previous", "Next" and "Finish. I'd like to
know how to code the Previous and Next buttons so that they are
enabled/disabled when appropriate. I used the code below, but it disables
the "Next" button after one click and also with the "previous" button. I'd
like the "Next" button to be enabled on pages 1 thru 3 and disabled on page
4; I'd like the "Previous" button to be enabled on pages 2-4 and disabled on
page 1. Thank you for any help that you can provide.
Private Sub cmdNext_Click()
Select Case mpgTab.Value
Case 0 'on General Page
mpgTab.Value = 1
cmdPrevious.Enabled = True
cmdNext.Enabled = False
cmdFinish.Default = True
End Select
End Sub
Sub cmdPrevious_Click()
Select Case mpgTab.Value
Case 1
mpgTab.Value = 0
cmdPrevious.Enabled = False
cmdNext.Enabled = True
cmdNext.Default = True
cmdFinish.Default = False
End Select
End Sub