Yes/No/Don't Know...

G

Guest

I'm making a database that should be very simple: based on a paper-based form
we've been using for a while, there are a lot of detailed questions to which
the user answers "Yes", "No" or "Don't Know" or leaves it blank to come back
to later.

I'm trying to find the best way of handling this:

One is to use a combo box with the limit to list set to Yes, based on a
table with the four possible answers (Yes, No, Don't Know, ""). The problem
is that filtering is awkward if you want to list records with a certain combo
box set to blank (limit to list won't allow even Null to be used).

Another way is to use an option group. This looks best, is the clearest to
the user and fits in with most people's experience of web-based forms.
However, the problem with filtering for blank comes up again. Also, Access
seems to allow you to choose any number of options from the same group when
in filter-by-form which I find confusing (and I'm the developer!).

The best solution seems to be a listbox which filters fine for all four
values. However, this is 2006 and listboxes went out with the ark.

Any suggestions?
 
A

Allan Murphy

Martin

Use an Option box, also put the field that will store the response, answer,
on the form but hide it.
Then using the On exit event set the response or answer to the value of
option box.

Sample code

Private Sub Frame2_Exit(Cancel As Integer)
Me!answers = Me!Frame2
End Sub

Note when you create the option group you will be asked for labels you will
need to enter something for a blank but
after you exit this wizard you can remove the label and still have an option
with no label. Also set the blank as the default.
 
G

Guest

Thanks for that Allan - I'll give it a go.

Allan Murphy said:
Martin

Use an Option box, also put the field that will store the response, answer,
on the form but hide it.
Then using the On exit event set the response or answer to the value of
option box.

Sample code

Private Sub Frame2_Exit(Cancel As Integer)
Me!answers = Me!Frame2
End Sub

Note when you create the option group you will be asked for labels you will
need to enter something for a blank but
after you exit this wizard you can remove the label and still have an option
with no label. Also set the blank as the default.
 
G

Guest

First, the exit event is not the correct event to use, it should be the After
Update event. Also, there is another way that will not require any coding.
Set the Default Value of the Option Group frame to Null. A Null value will
mean the question hasn't been answered.
 

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