Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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!

  • Administrator
  • 26,019 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