Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Access query question


  • Please log in to reply

#1
parrothead16

parrothead16

    Member

  • Member
  • PipPip
  • 31 posts
Greetings. I have an Access Query that contains 5 fields. I only want Field 5 to display is Field 4 matches Field 3. I am having a difficult time with this and something tells me I trying to over engineer it. Can anyone suggest some ideas how to accomplish this task? Thanks.
  • 0

Advertisements


#2
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
sorry i don't run many queries in access (sql is easier) but are you creating a query in "design" view within the database?

if so you would put the field that you want displayed (field 5 in your description) in the field section
then in the criteria you would simpy put "where field4 = field3" then save and run the query
  • 0

#3
dsm

dsm

    Member

  • Member
  • PipPip
  • 98 posts
parrothead,
You can use an iif statement to acheive the outcome you have stated.
The iif statement has 3 parts a logical test , value if test is true , value if test is false.
In the area where you would normally drag and drop fields to be displayed in the query type the following.

MyLabel: IIf([Field3]=[Field4],[Field5],Null)


hope this helps

dsm
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP