Solved

Query question

Posted on 2016-10-26
4
47 Views
Last Modified: 2016-10-26
Hi Experts,
I have a query question.  I have a table for Team,  the table only has one field and it's text field.  it stores "00", "PD", "IS", "SU" these four teams.  I would like to create a query for the drop down, but I need combine "00" and "PD" as one name call "DC", so the drop down only shows "DC", "IS" ,"SU".  I tried to used DC: IIf([TEAM]="00" or [TEAM]="PD"),"DC")  IS: IIf([Team]="IS","IS")  SU: IIF([Team]="SU","SU")   but it did not give me the list, what I did wrong?

Thanks
0
Comment
Question by:urjudo
  • 3
4 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 41860752
try this query as the rowsource of your dropdown list

select iif([Team] In("00","PD"),"DC",[Team]) From  NameofTable

or

select iif([Team]="00" Or [Team]="PD","DC",[Team]) From  NameofTable
0
 

Author Comment

by:urjudo
ID: 41860766
I tried in the query, it gave me this result

Expr1
DC
IS
DC
SU
shows DC twice instead once
0
 

Author Comment

by:urjudo
ID: 41860768
got it, I group it.

Thanks & sorry
0
 

Author Closing Comment

by:urjudo
ID: 41860769
Thanks!!!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question