Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

ms access training - if statements

Forum home » Delegate support and help forum » Microsoft Access Training and help » ms access training - If statements

ms access training - If statements

ResolvedVersion Standard

Sin has attended:
Access Intermediate course
Access Advanced course
Access VBA course

If statements

I am trying to set up a statement that does the following:
Column 1 - has data
Column 2 - may or may not have data
Column 3 - is to contain the IFf statement which will check columns 1&2 and if 2 is blank, insert the contents of 1. If not, insert the contents of column 2.

Currently I can get it to insert the contents of either one or 2 at a time but not pick from both.

RE: If statements

Try

=IIF([field2] is null, [field1],[field2])

RE: If statements

Perfect! Thanks very much.

Access tip:

Create An Inaccessible Field On A Form

There is sometimes a need to make a field in a form look like a normal field but be completely inaccessible to the user. To do this:

In the Field's Properties
Set the ENABLED property to No
Set the LOCKED property to Yes

The field will not grey out, but the user will not be able to do anything with it.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.