A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Filter recordset using query results



 
 
Thread Tools Display Modes
  #1  
Old March 18th, 2010, 12:09 PM posted to microsoft.public.access
Sue[_9_]
external usenet poster
 
Posts: 65
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.