| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
IF statement problem - VBA
ok, not sure if this belongs here on the the Access help bit so I've posted it in both.
my code reads as follows: Private Sub cmdNextStep_Click() If PageIndex = 0 Then pgeStepTwo.Visable = True pgeStepTwo.SetFocus pgeStepOne.Visable = False Else pgeStepThree.Visable = True pgeStepThree.SetFocus pgeStepTwo.Visable = False End If End Sub Now the button works perfectly to go from Step One to Step Two but it will not go from Step Two to Step Three. I've also tried "else if page index = 1" but still nothing happens when I click the button. Any help will be much appreciated. Katrina |
|
#2
|
||||
|
||||
|
The problem I see here is that in your code, you never update the value of PageIndex.
I would increment it here: Code:
If PageIndex = 0 Then pgeStepTwo.Visable = True pgeStepTwo.SetFocus pgeStepOne.Visable = False PageIndex = 1 Else |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > IF statement problem - VBA |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|