i'm using the if statement along with the yes/no message box. I have used some code that based on the value of certain fields will prompt the yes/no message box, however the no response works but the yes response doesn't function properly. when yes is selected it stays on the current form allowing you to select the activities but on clicking the proceed but again it prompts the yes/no message box and starts all over instead of taking you to the next form as the no response would. how can i make the yes response allow one to enter details before going to the next form.
If AdultCanoeing.Value Or AdultTennis.Value Or AdultWaterSkiing.Value Or AdultWindSurfing.Value Or ChildCanoeing.Value Or ChildTennis.Value Or
ChildWaterSkiing.Value Or ChildWindSurfing.Value Or InfantCreche.Value <= 0 Then
Dim reply As DialogResult = MessageBox.Show(" No Extras selected, Do you want Extras", "", MessageBoxButtons.YesNo)
If reply = DialogResult.No Then
MsgBox("Proceeding to the next page")
Form3.Visible = True
' ElseIf AdultCanoeing.Value Or AdultTennis.Value Or AdultWaterSkiing.Value Or AdultWindSurfing.Value Or ChildCanoeing.Value Or ChildTennis.Value Or
' ChildWaterSkiing.Value Or ChildWindSurfing.Value Or InfantCreche.Value > 0 Then
' Me.Hide()
Else
MsgBox("Choose activities")
Form3.Visible = False
Form3.Visible = True
End If
End If
If ChildCanoeing.Value Or ChildTennis.Value Or ChildWaterSkiing.Value Or ChildWindSurfing.Value > Form1.NumericUpDownKids.Value And
AdultCanoeing.Value Or AdultTennis.Value Or AdultWaterSkiing.Value Or AdultWindSurfing.Value > Form1.NumericUpDownAdults.Value And
InfantCreche.Value > Form1.NumericUpDownInfants.Value Then
Me.Hide()
Form3.Visible = True
End If

New Topic/Question
Reply




MultiQuote



|