IIF statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm just learning my way with IIF statments. I am creating a rent roll. Two
basic tables are involved - Leases and Properties. Availability for
Properties with a lease in effect Today is NO, and the rent income is the
amount of total rent. Availability for Propeties without a lease in effect
today is YES and rent income is zero. We want to add a third AVAILABLE option
- FUTURE to show that some properties without a lease in effect today do have
a lease which starts at a later date. We want to show the rent income as
zero. I have the IIF statments for YES and NO but can't come up with one that
works for future. Could someone help, please?
TIA
Bibi
 
Bibi,

Yes. But how do you know whether there is a lease in effect today, or a
lease which starts at a futrure date? Presumably you have a date field
in your Leases table that you use for this purpose? What is the IIf()
expression you have come up with so far?
 
Steve
This is what I'm using right now
Available: IIf([Lease Ends]>Date(),"NO","YES")
In another query for properties unelased as of today with future leases, I
created another field Available in Future and used this statement:
Available in Future: IIf([qFuture Leases (ie beginning after
today).count]=1,"NO"," ")
So right now I have two fields in my report Available Now and Available in
Future - The Available in future field is only for properties not leased as
of today - the logic gets fuzzy here because all properties will become
available at some time in the future so I have limited it to only currently
unleased. If I could get the report back to one available field - it would be
very good. Thanks for the reply. All help is appreciated.
 
Bibi,

Well, you still haven't given us much to go on, but at a guess I would
say there is probable also a field [Lease Starts] or some such, am I
right? If so, would this work?...
Available: IIf([Lease Ends]>Date(),"NO",IIf([Lease
Starts]>Date(),"FUTURE","YES"))
 
Steve
Thank you
I guess I need to relook this - I'm not getting future as a result.
Thank you.
--
TIA
Bibi


Steve Schapel said:
Bibi,

Well, you still haven't given us much to go on, but at a guess I would
say there is probable also a field [Lease Starts] or some such, am I
right? If so, would this work?...
Available: IIf([Lease Ends]>Date(),"NO",IIf([Lease
Starts]>Date(),"FUTURE","YES"))

--
Steve Schapel, Microsoft Access MVP

Steve
This is what I'm using right now
Available: IIf([Lease Ends]>Date(),"NO","YES")
In another query for properties unelased as of today with future leases, I
created another field Available in Future and used this statement:
Available in Future: IIf([qFuture Leases (ie beginning after
today).count]=1,"NO"," ")
So right now I have two fields in my report Available Now and Available in
Future - The Available in future field is only for properties not leased as
of today - the logic gets fuzzy here because all properties will become
available at some time in the future so I have limited it to only currently
unleased. If I could get the report back to one available field - it would be
very good. Thanks for the reply. All help is appreciated.
 
Ok, Bibi. If you need further help, please post back, but you will need
to give a lot more detail about your tables, fields, and query if you
want more specific help.
 
Back
Top