Access IF Statement

G

Guest

I was wondering if it was possible to do the following:

I have a series of field numbers (12345, 12346, etc...) in one column, and
for my report in MS Access I need to show those field numbers along with
another box that will show cutting dates for those fields. For the Even
field numbers it will show "Cut July 1st - December 31st" and for every Odd
number show "Cut June 15th - December 31st". Can i use an IFF statement to
recongize the number and put in the correct cutting date in the other box.

(I have simplized this probelm because I would have to do this function with
multiple columns, but if any one can get me started i can figure out the
rest).

HELP!
 
F

fredg

I was wondering if it was possible to do the following:

I have a series of field numbers (12345, 12346, etc...) in one column, and
for my report in MS Access I need to show those field numbers along with
another box that will show cutting dates for those fields. For the Even
field numbers it will show "Cut July 1st - December 31st" and for every Odd
number show "Cut June 15th - December 31st". Can i use an IFF statement to
recongize the number and put in the correct cutting date in the other box.

(I have simplized this probelm because I would have to do this function with
multiple columns, but if any one can get me started i can figure out the
rest).

HELP!

Well, you can't use IFF because there 'ain't no' IFF.
You can, however, use IIf.
If I understand your question (and I'm not at all sure I do), then in
an unbound control on your report:
=IIf([FieldName] Mod 2 = 0, "Cut July 1st - December 31st","Cut June
15th - December 31st")
 

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