How do I filter?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. I need to apply some sort of filter ( I assume) so that if (for example)
the answer to question #4 is "No" then the form/table will automatically skip
to question #13. How do I do this and do I apply the filter in the table or
the form?

Thanks!
Jen
 
Jen,
It's not really a question of "filtering." It's just coding to get the result you
desire.

I'm assuming Q4 is a "Yes" or "No" text field... if it's Boolean True/False, code
accordingly.

Use the AfterUpdate event of Question4 to determine what the response to Q4 was, and
act accordingly. (use your own field names)

If Q4 = "No" Then
Q5.Visible = False
'thru.....
Q12.Visible = False
ElseIf Q4 = "Yes" Then
Q5.Visible = True
'thru
Q12.Visible = True
End If

*You'll also need to put that same code in the OnCurrent event of the form.*
As you browse from record to record, you'll need to hide/show those questions
according to the Q4 response.
 
Back
Top