If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Filter recordset using query results
Hi all
I have a form based on a query called [qry Quarterly Planning], it lists all Itineraries on the system. On this form you can filter records by specifying a Start and End Date for the [ReviewDate] and/or [Specialist]. It is a subform on a main unbound form, lets call this Subform1. Along side this I have another subform (Subform2) which displays ReviewDates that exist against an Itinerary. In other words Subform1 has a start date of an activity and if the activity lasts longer than 1 day, then the additional dates are stored in Subform2 (ItineraryDates). Currently when I filter Subform1 on the dates it only shows itineraries based on the start date of the activity (ReviewDate). What I want to do is also include any Itineraries that have the dates in subform2 (ReviewDates) that fall in the date range too. ie if you search between 01/04/10 and 30/04/10 Itineraries that maybe start in March but run into April should be displayed. I have created a union query ([qry quarterly planning itineraries]) which combines all dates and links to the Itinerary to display all the Itineraries needed, but I am not sure how to use this in my form filter? I know you can change recordsource but the user may then want to change the dates and do another filter so this would need to be on the original recordsource again. Please can you tell me how best to achieve this? N.B. Please don't worry about the db design as this is a very large database and it has been changed over the years to best suit our working practices... I can't change the table designs now. Thanks.... Sue. (Access 2003) |
Thread Tools | |
Display Modes | |
|
|