Logic operators

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

Guest

You can use a form in Access to input data. Drop-down menus can be used to simplify data input. The data stored from a drop-down menu is in numerical format (e.g. 1, 2, 3 etc). A report generated from the table so compiled, accordingly, outputs "1", "2" or "3".

How do you get something else (i.e. text rather than a number) to appear in the report?

I'd thought about using a logical operator (c.f. Excel) e.g. =IF (value=1, "Apples", "Oranges") but this doesn't seem to work. How can I achieve the same result by other means

Regards

Tom H
 
Tom said:
You can use a form in Access to input data. Drop-down menus can be used to simplify data input. The data stored from a drop-down menu is in numerical format (e.g. 1, 2, 3 etc). A report generated from the table so compiled, accordingly, outputs "1", "2" or "3".

How do you get something else (i.e. text rather than a number) to appear in the report?

I'd thought about using a logical operator (c.f. Excel) e.g. =IF (value=1, "Apples", "Oranges") but this doesn't seem to work. How can I achieve the same result by other means?


Typically, a dropdown combo box uses a "lookup" table that
has at least two fields, one is the numeric value you're
seeing in your data table and the other is a friendly
desciption that the user sees in the dropdown list.

When you create the query for your report, add the lookup
table to the query and make sure that the connecting line
between the two tables is between the numeric field in your
data table and the related numeric field in the lookup
table. Then you can add the friendly string to the query's
field list for the report to use instead of the numeric
value.
 
Back
Top