P
Public Schools
Hello.
I am having trouble writing an If.Then.Else statement and need assistance.
My report is set up as follows:
Question No. Correct Answer Reporting Category Descriptor
1. B 002
Estimation
2. D 006
Geometry
3. C 007
Patterns
4. C 001
Statistics
5. A 003
Algebra
6. C 004
Numbers
etc.
I would like the even numbered/row answers to be:
A=F
B=G
C=H
D=J
The Question No is a text box and is unbound. The Correct Answer field is
[CorrectAnswer].
I've tried the following, but it does not work. Any suggestions?
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Me.[LineNum] Mod 2 = 0 Then
Me![CorrectAnswer].Text "A" = "A"
Me![CorrectAnswer].Text "B" = "B"
Me![CorrectAnswer].Text "C" = "C"
Me![CorrectAnswer].Text "D" = "D"
Else
Me![CorrectAnswer].Text "A" = "F"
Me![CorrectAnswer].Text "B" = "G"
Me![CorrectAnswer].Text "C" = "H"
Me![CorrectAnswer].Text "D" = "J"
End If
End Sub
Thanks for your time.
I am having trouble writing an If.Then.Else statement and need assistance.
My report is set up as follows:
Question No. Correct Answer Reporting Category Descriptor
1. B 002
Estimation
2. D 006
Geometry
3. C 007
Patterns
4. C 001
Statistics
5. A 003
Algebra
6. C 004
Numbers
etc.
I would like the even numbered/row answers to be:
A=F
B=G
C=H
D=J
The Question No is a text box and is unbound. The Correct Answer field is
[CorrectAnswer].
I've tried the following, but it does not work. Any suggestions?
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Me.[LineNum] Mod 2 = 0 Then
Me![CorrectAnswer].Text "A" = "A"
Me![CorrectAnswer].Text "B" = "B"
Me![CorrectAnswer].Text "C" = "C"
Me![CorrectAnswer].Text "D" = "D"
Else
Me![CorrectAnswer].Text "A" = "F"
Me![CorrectAnswer].Text "B" = "G"
Me![CorrectAnswer].Text "C" = "H"
Me![CorrectAnswer].Text "D" = "J"
End If
End Sub
Thanks for your time.