ms access training - if statements
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

ms access training - If statements

The UK's most regular instructor-led training courses.
Training information: ms access training · Microsoft access courses · Microsoft Access Training
See also · microsoft access training · access vba courses · access database course

resolvedResolved · Low Priority · Version Standard

If statements

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

by - delegate Sinéad [15 posts] (2007 Jul 19 Thu, 15:36) replyReply

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.

Access Intermediate 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003 2008 Sep 2 Tue Southwark 3 book now £210 £215
2003 2008 Sep 9 Tue Bloomsbury 6 book now £193 £215
2002/XP 2008 Sep 11 Thu Tooting 0 FULL    
2003 2008 Sep 19 Fri Bayswater 5 book now £195 £205
2007 2008 Sep 23 Tue Bloomsbury 5 book now £212 £224
2002/XP 2008 Sep 24 Wed Tooting 0 FULL    
Full Schedule: See all 73 Access Intermediate course dates.
Bookings currently available until 24th November 2009.

RE: If statements

by - trainer Richard platinum contributer[785 posts] (2007 Jul 20 Fri, 10:29) replyReply

Try

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

RE: If statements

by - delegate Sinéad [15 posts] (2007 Jul 20 Fri, 15:08) replyReply

Perfect! Thanks very much.


Related articles

· The Benefits of Certified Microsoft Training in Access
· MS Access: Access your Personal Information with Ease
· How Reorganising Your Data Can Take Your Business to the Next Level
· Reasons to Consider Microsoft Access Training
· Access Database Optimization: First Normal Form

Access tip:

Calculating The Difference Between Dates

If you wish to calculate the time between two date fields, this can be done in a number of ways:

1. As a calculated field in a query
2. As a calculated control in a form or report
3. As a calculation in a VBA procedure.

The basic syntax to get the number of days between two dates is:

=[One Date Field] - [Another Date Field]

You can also use one of the following functions:

=Month([One Date Field] - [Another Date Field])
which calculates the number of months between the two fields

=Year([One Date Field] - [Another Date Field])
which calculates the number of years between the two fields.

Another function is the DateDiff() function.

It uses an argument to determine how the time interval is measured. For example:

=DateDiff("q",[One Date Field] - [Another Date Field])
returns the number of quarters between the two fields.

Other intervals that can be used in this expression are as follows:
"yyyy" - Years
"m" - Months
"d" - Days
"w" - Weekdays
"ww" - Weeks
"h" - Hours
"n" - Minutes
"s" - Seconds

View all Access hints and tips

Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information
AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz