using sql to display text

  • Thread starter Thread starter DominicW
  • Start date Start date
D

DominicW

I have been sent a csv file for an online survey we are doing.
I have created an access database to display this and for easy report
etc.

a lot of the questions are multiple answers and the format it has bee
sent to me is if the answered the tick button for the 3rd answer to th
question the value is 3.

How can i tell each part of my form that if the value is 3 to displa
text "whatever"

for instance

if velue = 3 display text "goats"
if value = 3 display text "dogs"
if value is null display text "no answer
 
I would suggest that you create a lookup table for each
question of this sort, with one field for the value and
one for the text you wish to display.
Then, on your form, cretae an unbound text box with its
default value set to
=DLookup("[Text]","LookupTable","LookupTable]![Value]=
[Form]![Value]")
(you'll need to modify the names to match yours,
ofcourse...)
Tip: the text box with the current answer value on your
form can be made invisible (and disabled, and locked, and
no tab stop...)

Nikos Y. (nyannaco at in dot gr)
-----Original Message-----
I have been sent a csv file for an online survey we are doing.
I have created an access database to display this and for easy reports
etc.

a lot of the questions are multiple answers and the format it has been
sent to me is if the answered the tick button for the 3rd answer to the
question the value is 3.

How can i tell each part of my form that if the value is 3 to display
text "whatever"

for instance

if velue = 3 display text "goats"
if value = 3 display text "dogs"
if value is null display text "no answer"



------------------------------------------------
 
I have been sent a csv file for an online survey we are doing.
I have created an access database to display this and for easy reports
etc.

a lot of the questions are multiple answers and the format it has been
sent to me is if the answered the tick button for the 3rd answer to the
question the value is 3.

How can i tell each part of my form that if the value is 3 to display
text "whatever"

for instance

if velue = 3 display text "goats"
if value = 3 display text "dogs"
if value is null display text "no answer"

I have to partially disagree with Nikos' suggestion: you might prefer
to have only ONE table of answers. This table could have three fields
- the question number; the answer number; and a text field providing
the meaning of that answer. You could then create a Query joining the
questionnaire table to this table by the two numeric fields,
displaying the text result.
 
Back
Top