Solved

Showing a subset of data based on dropdown

Posted on 2013-01-26
2
207 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 84

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

738 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