Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Query Criteria
Robert Freeman 
      
3 years ago
Hi. Am I trying to write a query that will produce a report in a membership database. One of the fields is 'MembershipYear' determined by different records in a table. The report needs to show whether a member has paid for 2023 and/or 2024 in two separate columns in a row showing the member's name. I don't seem to be able to get the right criteria to do this when I try to enter 'MembershipYear' twice (as two columns). Is it possible to get criteria from one field in two columns and if so how should I enter the criteria. Any advice would be appreciated. Thanks.
Robert Freeman OP  @Reply  
      
3 years ago

Juan C Rivera  @Reply  
            
3 years ago
Aliases
Need to change the name look at this video and let me know if this helped out.
Kevin Robertson  @Reply  
          
3 years ago
You need to make it an Or condition. Move 2024 down to the first Or row.
From your image you are saying the MembershipYear has to equal 2023 AND 2024. It can't equal both years.
Also, I am assuming the data type is a number so you don't need the quotes.
Kevin Robertson  @Reply  
          
3 years ago
Do you really need to column for MembershipYear?
Could you add MembershipYear once and make the criteria 2023 Or 2024?
Robert Freeman OP  @Reply  
      
3 years ago
Hi all and thanks for the suggestions. To expand: I have a 'MembershipPaymentsT' in which is recorded any payments made by members during any given year. One of the fields is 'MembershipYear' - currently 2023 or 2024 but this will change as years are added in the future.
What I am trying to achieve is an easy to read report that shows a member's name and then a series of columns showing in which year they were a member:
FirstName  |  LastName  |  2023  |  2024   etc.

I can run a query that will show this with the information BUT the membership year is shown in a single column. I can sort on any of the columns of course but none of the sort options give me the single line result I'm trying to achieve.

Eventually I would like to replace the 'year' with text that shows 'Paid' but that's the next step!

FYI aliases do not seem to work either.
Kevin Robertson  @Reply  
          
3 years ago
Have you considered using Grouping in the report?
Kevin Robertson  @Reply  
          
3 years ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 4:32:09 AM. PLT: 1s