Adding a Y or N to a field if it's Not null in Access 2010

lg5050

Registered User.
Local time
Today, 04:38
Joined
Nov 26, 2014
Messages
25
Hi, i'm trying to figure out how to make this two fields in my form to say Y or N if the field is Not Null. Like if the field is not null = Y Else = N for the two fields. I have a picture to show what i'm talking about. Please help!!:confused:
 

Attachments

  • access form.png
    access form.png
    76.2 KB · Views: 115
You have a couple of functions you need to use.

IsNull(Argument) returns true or false depending on if the value of the supplied argument is null.

IIf(Argument, TrueResult, FalseResult) determines whether Argument is true or false, and returns the corresponding result.

Put them together, and you would have a control source like this:
Code:
=IIf(IsNull(Me.ControlName), "N", "Y")
 
ok...i have a field called USLine and if i use that code for the USoFlag showing in the picture that show work for the field USLine.
 

Users who are viewing this thread

Back
Top Bottom