Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If formula with more than one condition

Status
Not open for further replies.

carolineJ

Technical User
Sep 25, 2001
43
0
0
SE
I have a field called month in a table with values from 1-12. In my query I want a calculated field that shows the name of the month instead of number, i.e if field month is 5 then the calculated field is "May". I think I can do it for two months (if month = 1 then "January" or else "February") but how can I have more than one condition so that I can continue with the rest of the months?
 
Use a format statement to show the months instead.
Format([yourdatefield],"mmmm") Maq B-)
<insert witty signature here>
 

You can use the Choose function in a query. Choose selects the entry in the list based on the number in the Choice criteria which is the 1st parameter.

Choose([Month], &quot;January&quot;, &quot;February&quot;, &quot;March&quot;, ..., &quot;December&quot;)
Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top