Unanswered: Why Doesn't This work Right?
This is all the code for my REPORT named Generated_Test:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim AnswerLetter As String
Dim PaperID As String
Dim QuestionNumber As Integer
Dim DBName As String
DBName = "CorrectAnswers"
'Generates Parsing Values
AnswerLetter = "A or B or C"
PaperID = "Version A"
QuestionNumber = Me.Text27
'Appends answers to CorrectAnswer database
appendSql = "INSERT INTO CorrectAnswers(PaperID,QuestionNumber, " & _
"AnswerLetter) SELECT '" & PaperID & "'," & QuestionNumber & " ,'" & _
AnswerLetter & "'"
When you open the report.. it displays questions from my database (Test #1). It then should create an Answer Sheet in the database (CorrectAnswer).
My problem: If I have a 7 question (Test #1) database.. after I run the report (which displays fine).. the CorrectAnswer database has answers 1-7 (which are all wrong) and another 1-7 (which are all right) appended to it. For a total of 14 answers.
Can anyone see why this code would cycle the database twice? Appending data to my database two times...
"How much deeper would the ocean be without sponges?"