Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2008

Tip: Looking for answers? Try searching our database.

Form issue with checkbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
drcanaday - 31 Jul 2008 19:30 GMT
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
Linq Adams - 31 Jul 2008 19:39 GMT
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.

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

drcanaday - 31 Jul 2008 19:55 GMT
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.

>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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.