Hi,
I am new to VB and to wizards. I am trying to create a multi page wizard (about 15 pages) with over 70 questions and controls (labels, textboxes, radio buttons, check boxes, drop down boxes, custom end buttons). I tried 2 vendor solutions (fxware and kellermansoftware) before trying Actipro. I pretty much get things working in the other 2 solutions, but I cannot get the final result I am looking for and hence am trying my luck with Actipro.
1. I would like Next button (or Back) to be greyed out if any controls are not filled out on that page (could be radio button, textbox, checkbox)
2. I would like a double check question on cancel and finish e.g. are you sure you want to cancel - you will loose data if not completing all pages...
3. On the final wizard page I would like some custom buttons e.g. save all inputs to csv file (I have this working in other wizard tools), insert values into Access 2007, insert summary report into Word 2007, insert summary into Word and include averages from Access 2007 query.
Can this be achieved? At the moment, I am stuck on point 1 above how to validate controls on a page and if all questions from page 1 are answered, then user can click next, then repeat of validation on page 2 and so on...
I saw sample code:
Private Sub validatingTextBox_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles validatingTextBox.Validating
If (Me.Wizard.SelectedPage Is dataCollectionPage) And (validatingTextBox.Text.Length = 0) Then
'User has not entered a description, prompt with error provider
errorProvider.SetError(validatingTextBox, "Please provide a description.")
e.Cancel = True
Else
'Cancel any outstanding error provider
errorProvider.SetError(validatingTextBox, Nothing)
End If
End Sub
BUT how do I modify this to perform validation on all my controls on each seperate page?
Thanks in advance
I am new to VB and to wizards. I am trying to create a multi page wizard (about 15 pages) with over 70 questions and controls (labels, textboxes, radio buttons, check boxes, drop down boxes, custom end buttons). I tried 2 vendor solutions (fxware and kellermansoftware) before trying Actipro. I pretty much get things working in the other 2 solutions, but I cannot get the final result I am looking for and hence am trying my luck with Actipro.
1. I would like Next button (or Back) to be greyed out if any controls are not filled out on that page (could be radio button, textbox, checkbox)
2. I would like a double check question on cancel and finish e.g. are you sure you want to cancel - you will loose data if not completing all pages...
3. On the final wizard page I would like some custom buttons e.g. save all inputs to csv file (I have this working in other wizard tools), insert values into Access 2007, insert summary report into Word 2007, insert summary into Word and include averages from Access 2007 query.
Can this be achieved? At the moment, I am stuck on point 1 above how to validate controls on a page and if all questions from page 1 are answered, then user can click next, then repeat of validation on page 2 and so on...
I saw sample code:
Private Sub validatingTextBox_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles validatingTextBox.Validating
If (Me.Wizard.SelectedPage Is dataCollectionPage) And (validatingTextBox.Text.Length = 0) Then
'User has not entered a description, prompt with error provider
errorProvider.SetError(validatingTextBox, "Please provide a description.")
e.Cancel = True
Else
'Cancel any outstanding error provider
errorProvider.SetError(validatingTextBox, Nothing)
End If
End Sub
BUT how do I modify this to perform validation on all my controls on each seperate page?
Thanks in advance