IIf Question

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

Guest

hi,
I have used this before with no problems. I am guessing
but i think it may be that one of your data sources in a
query. i always use tables as data sources.
try changing your data source from the query to the
underlying table the query uses.
 
The problem is that I need to get as an output the query result--that
particular piece of data is not in the table. Unless I put the switch
statement into the IIF statement. I'll try that.

hi,
I have used this before with no problems. I am guessing
but i think it may be that one of your data sources in a
query. i always use tables as data sources.
try changing your data source from the query to the
underlying table the query uses.
-----Original Message-----
I am trying to write a field in a query so that if the user has entered data
in the
TradeUseM field, it will return that, but if the TradeUseM field is empty,
it will return a different field, TradeFull. TradeFull is a field of the
query that has been produced by a Switch statement.

My code for this is as follows:

TradeUse:
IIf([tblChgeOrders]![TradeUseM]="",[qryCO10]![TradeFull], [tblChgeOrders]![TradeUseM])

The negative part of this works fine. If something is in the TradeUseM
field that's what TradeUse returns. But the positive part is not returning
anything at all--if TradeUseM is blank I get nothing.

Any ideas? Many thanks.

This works fine
.
 
Back
Top