There are two items here that you are addressing. First, adding a record for a specialty in this case doesn't really matter which page you are on. It is more important that you have setup the relationship between the Faculty and Specialty since there is more than likely a foreign key between the two. StrataFrame will manage this relationship and foreign key value for you if you have this relationship established. I recommend looking at the Advanced ListView Population sample as this sample shows how to setup a simple relationship between two business objects. You can also look at the CRM Sample Application as well. But once you have the relationship setup you can add a specialty from any page and you only need to have the Faculty BO positioned on the record for which you wish to create the child specialty record. Again, this is all assuming that Specialty is a child of Faculty. Otherwise is is just a matter of creating a Specialty record.As for determining which page you are on, you can reference the CurrentPage property. This is a good way to determine which way to go:
If Me.WizardControl1.CurrentPage Is MyWizardPage Then
'-- Set the next page
Me.WizardControl1.SetActivePage(MyWizardPage)
End If
Also, I recommend handling the NextClicked event and using the NextPageToLoad event argument and/or CancelNavigation method. Below is a sample usage.
Private Sub WizardControl1_NextClicked(ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.NextBackEventArgs) Handles WizardControl1.NextClicked
If Me.WizardControl1.CurrentPage Is MyWizardPage1 Then
e.NextPageToLoad = MyWizardPage2
Else
e.CancelNavigation = True
End If
End Sub