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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An IF Statement Needed!!

Status
Not open for further replies.

KLewisBPM

Technical User
Jan 11, 2002
294
0
0
GB
I have a form in access where I need to create an if Statement. The field is a comments box that would as default display the words "No Problems". What I need is if a particular yes/no field is ticked then this needs to say "Mixing".

Is it possible to create an If statement and if so do I have to use the field "Default Value" or another one.

Any help would be very much appreciated.

Kind Regards

Kelley Lewis
 
In a text box try an =IIF statement as the control source. this uses the =IIF(SOMETHING,THEN,ELSE) format.

The code here compares the field enddate to the field startdate. If they are the same, it displays startdate, if they are different, it displays both with an & in between (separated by spaces).

=IIf([enddate]=[startdate],[startdate],[startdate] & " & " & [enddate])

Yours might be a little like this:

=IIf([particular yes/no field],"Mixing","No Problems")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top