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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Box and IIF statements Question!

Status
Not open for further replies.

tyleri

Programmer
Jan 2, 2001
173
US
I have a task that I know is doable but is confusing to me.
I have 3 fields in a table that have the values 0 or 1.

Field 1: 0 = nothing 1 = New Account
Field 2: 0 = nothing 1 = Banking Account
Field 3: 0 = nothing 1 = Broker

I want the list box to show each record with a listbox that shows ONLY what the client DOES have.

So if one client only has "Banking Account", then I want the list box to show: Banking Account

If the client has "Broker and Banking Account" I want the list box to show:

Broker
Banking Account

just like that - no NULL values!

Does anyone understand what I"m talking about and can show me the code that I must use to get this?

Thanks in advance!

Tyler
 
Code this in a cursor. Select all 3 fields in your fetch, and have 3 separate if statements that insert into a temp table if the value in each field is 1. At the end of the cursor loop, select the column from the temp table...
Tom Davis
tdavis@sark.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top