Solved

Showing a subset of data based on dropdown

Posted on 2013-01-26
2
213 Views
Last Modified: 2013-01-26
This must be easy ... but I have been struggling a bit.

1. I own 4 hotels (pretend!).  Hotel East, Hotel West, Hotel North, Hotel South

2. I analyse my hotel customers into sources such as, "Families", "Business", "Golf" etc.

3. At the end of each month I input the sales per source per hotel per week.  E.g. Hotel East has 33 bookings for Families in the week ending December 31st.

4. QUESTION: See frmShowSpecificBookings.   Firstly I choose a week at the top of the screen.  How to I show ONLY those weeks bookings in the subform below (frmBookings).

PS: I am fairly sure I use a query in the subform that has Forms!frmShowSpecificWeek!WeekID etc.    However, I have been unable to implement this fully.
Database1.accdb
0
Comment
Question by:Patrick O'Dea
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 38821881
1. Add the field tblWeeks.WeekID to qrySalesDetails

2. Add this code to the AfterUpdate of Combo0:

Me.frmBookings.Form.RecordSource = "SELECT * FROM qrySalesDetails WHERE WeekID=" & Me.Combo0.Column(0)

That will show all records for all Hotels associated with that specific record in "tblWeeks".
0
 

Author Closing Comment

by:Patrick O'Dea
ID: 38821890
Thanks, Perfect!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

631 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