Periodic skipping of row

ffleitas

Registered User.
Local time
Today, 05:34
Joined
Oct 19, 2009
Messages
14
Greetings,

I have a form that asks the user a series of questions. It is Boolean so they click on either Yes or No and then the next question is generated. The questions are displayed in the order they are asked. The problem is as follows:

1 out of every 20 something or sometimes 50 the first question skips and looses focus. The series of questions are not in their perspective order. The user must close the form and re-enter. Please look at the code below and determine if there are any red flags?

Thank you,
Felix

______________________________________________
Private Sub framYesNo_AfterUpdate()
On Error GoTo errorchk
Dim vID As Integer

' resets listbox to blank
Me.lstListbox.RowSource = ""
With Forms("F_Questionnaire") '.Form
.Form.cmbAns = IIf(Me.framYesNo, "Yes", "No")
.Form.Q_ListboxData = IIf(Me.framYesNo, "Yes", "No")
.Form.SetFocus
.cmbAns_AfterUpdate
vID = .Form.CurrentRecord
nextQuestion (vID)
.Form.Requery
Me.Recordset.MoveLast
Me.cmbAns.SetFocus
Me.framYesNo = Null
End With

exit_errorchk:
Exit Sub

errorchk:
Select Case Err
Case Else
MsgBox Err & " - " & Error$
Resume exit_errorchk
End Select
End Sub
 

Users who are viewing this thread

Back
Top Bottom