Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF function and expression builder

Status
Not open for further replies.

ngardner

Technical User
Apr 1, 2002
35
0
0
AU
I have written an expression for my query which seems to work well. (Where Discovery is my table, 'type', 'original/copy' and are fields

IIf([Discovery]![Type]="Letter" Or "Email" Or "Invoice" Or "Transmitted Facsimile" Or "Received Facsimile";[Discovery]![Original/Copy] & " " & [Discovery]![Type]; [Discovery]![Original/Copy] & [Discovery]![Author's Company])

The only problem is that I need to do lots of IFF statements as I have several more 'type' options to cover (eg minutes, lease)
I tried inserting this as an expression in a query, but it is removing the end of the code, as it has obviously reached some kind of character limit. I did some research and I believe I can solve this by the use of a module, but I don't understand how I convert the code above to this!
Any help or ideas appreciated
 
Hi

If I may say so this is a very messy and dificult to maintain way of achieving a result, why not have a table of "Types" and use a join to include the relavant data in the query

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top