[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Query question

Posted on 2016-10-26
4
Medium Priority
?
80 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 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

872 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