Form issue with checkbox

D

drcanaday

Have a form with a question. The check boxes are answer options. If they only
select Q3_Friends, then the NextQuestion is enabled.
If they select any other combination of checkboxes, then another question
displays on the form. Answer that question and then get NextQuestion.
Have looked at the code so long, I can’t find the error.


‘==========Code Below==============
Private Sub Form_Open(Cancel As Integer)
With Me
.Q3_Newspaper.Value = getItem("Q3_Newspaper")
.Q3_Radio.Value = getItem("Q3_Radio")
.Q3_Signs.Value = getItem("Q3_Signs")
.Q3_FEMA.Value = getItem("Q3_FEMA")
.Q3_Local.Value = getItem("Q3_Local")
.Q3_Friends.Value = getItem("Q3_Friends")
.Q3_Flyers.Value = getItem("Q3_Flyers")
.Q3_Other.Value = getItem("Q3_Other")
.Q3_Other_Text.Value = getItem("Q3_Other_Text")
.Q3a.Value = getItem("Q3a")
.Q3b_Text.Value = getItem("Q3b_Text")
End With

If Q3_Radio.Value = True Then
Q3_Text.Visible = True
Q3a.Visible = True
Else

If Q3_Signs.Value = True Then
Q3_Text.Visible = True
Q3a.Visible = True
Else

If Q3_Local.Value = True Then
Q3_Text.Visible = True
Q3a.Visible = True
Else

If Q3_FEMA.Value = True Then
Q3_Text.Visible = True
Q3a.Visible = True
Else

If Q3_Flyers.Value = True Then
Q3_Text.Visible = True
Q3a.Visible = True
Else

If Q3_Newspaper.Value = True Then
Q3_Text.Visible = True
Q3a.Visible = True
Else

If Q3_Other.Value = True Then
Q3_Text.Visible = True
Q3a.Visible = True
Q3_Other_Text.Visible = True

Q3a.SetFocus
If Q3a.Text = "2. Not Very Effective" Or Q3a.Text = "1. Not At All Effective"
Then
Q3b.Visible = True
Label113.Visible = True
Q3b_Text.Visible = True
Q3b_Text.SetFocus
Else
Q3b_Text.Visible = False
Q3b_Text = Null
Q3b_Text.Value = ""
If Q3a.Text = "5. Extremely Effective" Or Q3a.Text = "4. Very Effective" Or
Q3a.Text = "3. Effective" Or Q3a.Text = "Don't Know/No Opinion" Then
Q3b_Text.Visible = False

If Q3.Value <> "" Then
Label115.Visible = False
Q3a.Visible = False
Q3b_Text.Visible = False
NextQuestion.Enabled = True
Else
NextQuestion.Enabled = False
End If

Else
Q3b.Visible = False
Label113.Visible = False
Q3b_Text.Visible = False
End If
‘ Else =====changed 7_30noon
' Q3_Text.Visible = False
' Q3a.Visible = False
' Q3_Other_Text.Visible = False
' Q3_Other_Text = Null
' HL3_Other_Text_COMM.Visible = False
End If
End If
End If
End If
End If
End If
End If
End If


End Sub
 
L

Linq Adams via AccessMonster.com

Neither can anyone here if you don't give us a clue! What is/isn't working?
What error are you getting? You can see your database, we can't.
 
D

drcanaday

I go to NextQuestion, takes me to a new form. On the new form, if I select
previous form, then I get a Run-time error '424': Object required. Then it
takes me on debug to the the
If Q3_Radio.Value = True Then
Q3_Text.Visible = True (this is the one it points to)
Q3a.Visible = True
Else

If I run it again, then it might point to one of the others in that group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top