| re: Creating skip rule in MS Access?
No.. Code is not written in a macro. In this case, the code is written using "Code Builder".
Create a new Command Button (turn off the wizard - or cancel when it appears). Still in design mode, right click on the button, and select "Build Event". Then choose "Code Builder". This will automatically create an OnClick Event Procedure for that button. Visual Basic will open, and the following code will appear (or something similar):
Private Sub Command5_Click()
End Sub
You then put the following code in between these 2 lines:
If Question1 = A Then
Call SUB1
Else
Call SUB2
End If
The final code will be:
Private Sub Command5_Click()
If Question1 = A Then
Call SUB1
Else
Call SUB2
End If
End Sub
Then, while still in Visual Basic, add the other subs. The final code will be:
Private Sub Command5_Click()
If Question1 = A Then
Call SUB1
Else
Call SUB2
End If
End Sub
Private Sub SUB1()
'(Enter Code Here for Question 2)
End Sub
Private Sub SUB2()
'(Enter Code Here for Question 3)
End Sub
Hope this makes sense.
comteck
|