Link to home
Start Free TrialLog in
Avatar of pdvsa
pdvsaFlag for United States of America

asked on

Switch

Expets, can I modify a SWITCH for anything that does not fit the parameters to be categorized as "Other"?  sorta like an IIF statement.  

thank you,
here it is:

MyLCType: Switch([tblLCTypeDropBox].[LCType] Like "*Bid*","Bid Bond",[tblLCTypeDropBox].[LCType] Like "*Performance*","Performance Bond",[tblLCTypeDropBox].[LCType] Like "*Advance*","Advance Payment Bond",[tblLCTypeDropBox].[LCType] Like "*Insurance*","Insurance Bond",[tblLCTypeDropBox].[LCType] Like "*Bid*","Bid Bond",[tblLCTypeDropBox].[LCType] Like "*Surety*","Surety Bond",tblLCTypeDropBox].[LCType] Like "*Parent*","Parent Company GT",[tblLCTypeDropBox].[LCType] Like "*Facility*","Credit Facility Bond")
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Maybe like this:

MyLCType: Switch([tblLCTypeDropBox].[LCType] Like "*Bid*","Bid Bond",[tblLCTypeDropBox].[LCType] Like "*Performance*","Performance Bond",[tblLCTypeDropBox].[LCType] Like "*Advance*","Advance Payment Bond",[tblLCTypeDropBox].[LCType] Like "*Insurance*","Insurance Bond",[tblLCTypeDropBox].[LCType] Like "*Bid*","Bid Bond",[tblLCTypeDropBox].[LCType] Like "*Surety*","Surety Bond",tblLCTypeDropBox].[LCType] Like "*Parent*","Parent Company GT",[tblLCTypeDropBox].[LCType] Like "*Facility*","Credit Facility Bond" , 1=1,"OTHER" )
Avatar of pdvsa

ASKER

mx:  it does not save like that for some reason.  I copy it and tab out but it does not save it.
Not sure what you mean ... does not save ?

mx
1=1,"OTHER" just says that ... if none of the other conditions apply, then this is the clean up condition ... catch all condition.

mx
Avatar of pdvsa

ASKER

Mx, what i mean is that when in query design window and use that equation and tab out of the column it will not save what i just entered.  I have encountered this before and it is usually a syntax or something like that... Let me know what you think...
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pdvsa

ASKER

that was it...thank you!