S
samm
Hi for all
I have multi choise questions Form
when I choose the answer on all groubs by option button,
I want save all answer in text(T4) ,
My problem I get one answer only for last choose at the
last groub in the text(T4)
The Main answer text is ( CORRECT ANSWER or WRONG ANSWER
AND THE CORRECT ANSWER IS 64 xxxxxxxxxxxx
------------------------------------------
I used this code:
Option Compare Database
Dim intQ1 As Integer, intQ2 As Integer, intQ3 As Integer
Private Sub Frame1_AfterUpdate()
intQ1 = 0
Select Case Me!Frame1
Case 1
intQ1 = 1
Let T4 = T4 & vbCrLf & " CORRECT ANSWER "
Case 2
Let T4 = T4 & vbCrLf & "WRONG ANSWER AND CORRECT IS 30"
Case 3
Let T4 = T4 & vbCrLf & "WRONG ANSWER AND CORRECT IS 30"
Case Else
MsgBox (?Error)
End Select
Me!T1 = dValue
T1 = intQ1 + intQ2 + intQ3
End Sub
Private Sub Frame13_AfterUpdate()
intQ2 = 0
Select Case Me!Frame13
Case 1
intQ2 = 1
Let T4 = " CORRECT ANSWER "
T4 = T4 & vbCrLf & "CORRECT ANSWER"
Case 2
Let T4 = "WRONG ANSWER AND CORRECT IS 42"
Case 3
Let T4 = "WRONG ANSWER AND CORRECT IS 42"
Case Else
MsgBox (?Error)
End Select
Me!T1 = dValue
T1 = intQ1 + intQ2 + intQ3
End Sub
Private Sub Frame22_AfterUpdate()
intQ3 = 0
Select Case Me!Frame22
Case 1
Let T4 = "WRONG ANSWER AND CORRECT IS 64 "
Case 2
intQ3 = 1
Let T4 = " CORRECT ANSWER "
Case 3
Let T4 = "WRONG ANSWER AND CORRECT IS 64"
Case Else
MsgBox (?Error)
End Select
Me!T1 = dValue
T1 = intQ1 + intQ2 + intQ3
End Sub
----------------------------------
for example:
Q1. 5X5=
A 25
B 22
C 20
Q2. 5X6=
A 25
B 30
C 20
Q3 6X7=
A 42
B 44
C 56
when I select Q1 option A the text answer1(CORRECT
ANSWER) come in T4
then I select Q2 option A the text answer2(WRONG ANSWER
AND CORRECT IS B) come in T4 instead of text answer1
(CORRECT ANSWER)
then I select Q3 option A the text answer3(CORRECT
ANSWER) come in T4 instead of text answer2 (WRONG ANSWER
AND CORRECT IS A)
at the end I get only this text (CORRECT ANSWER) in T4
But I like to get all answer in T4 as:
answer1(CORRECT ANSWER)
answer2(WRONG ANSWER AND CORRECT IS B)
answer3(CORRECT ANSWER)
I have multi choise questions Form
when I choose the answer on all groubs by option button,
I want save all answer in text(T4) ,
My problem I get one answer only for last choose at the
last groub in the text(T4)
The Main answer text is ( CORRECT ANSWER or WRONG ANSWER
AND THE CORRECT ANSWER IS 64 xxxxxxxxxxxx
------------------------------------------
I used this code:
Option Compare Database
Dim intQ1 As Integer, intQ2 As Integer, intQ3 As Integer
Private Sub Frame1_AfterUpdate()
intQ1 = 0
Select Case Me!Frame1
Case 1
intQ1 = 1
Let T4 = T4 & vbCrLf & " CORRECT ANSWER "
Case 2
Let T4 = T4 & vbCrLf & "WRONG ANSWER AND CORRECT IS 30"
Case 3
Let T4 = T4 & vbCrLf & "WRONG ANSWER AND CORRECT IS 30"
Case Else
MsgBox (?Error)
End Select
Me!T1 = dValue
T1 = intQ1 + intQ2 + intQ3
End Sub
Private Sub Frame13_AfterUpdate()
intQ2 = 0
Select Case Me!Frame13
Case 1
intQ2 = 1
Let T4 = " CORRECT ANSWER "
T4 = T4 & vbCrLf & "CORRECT ANSWER"
Case 2
Let T4 = "WRONG ANSWER AND CORRECT IS 42"
Case 3
Let T4 = "WRONG ANSWER AND CORRECT IS 42"
Case Else
MsgBox (?Error)
End Select
Me!T1 = dValue
T1 = intQ1 + intQ2 + intQ3
End Sub
Private Sub Frame22_AfterUpdate()
intQ3 = 0
Select Case Me!Frame22
Case 1
Let T4 = "WRONG ANSWER AND CORRECT IS 64 "
Case 2
intQ3 = 1
Let T4 = " CORRECT ANSWER "
Case 3
Let T4 = "WRONG ANSWER AND CORRECT IS 64"
Case Else
MsgBox (?Error)
End Select
Me!T1 = dValue
T1 = intQ1 + intQ2 + intQ3
End Sub
----------------------------------
for example:
Q1. 5X5=
A 25
B 22
C 20
Q2. 5X6=
A 25
B 30
C 20
Q3 6X7=
A 42
B 44
C 56
when I select Q1 option A the text answer1(CORRECT
ANSWER) come in T4
then I select Q2 option A the text answer2(WRONG ANSWER
AND CORRECT IS B) come in T4 instead of text answer1
(CORRECT ANSWER)
then I select Q3 option A the text answer3(CORRECT
ANSWER) come in T4 instead of text answer2 (WRONG ANSWER
AND CORRECT IS A)
at the end I get only this text (CORRECT ANSWER) in T4
But I like to get all answer in T4 as:
answer1(CORRECT ANSWER)
answer2(WRONG ANSWER AND CORRECT IS B)
answer3(CORRECT ANSWER)