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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access Form values to Report to Query



 
 
Thread Tools Display Modes
  #1  
Old April 5th, 2006, 07:18 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Access Form values to Report to Query

OK guys, I'm stumped and need some help.

I am writing some reports for a client.

I started by writing a query which is used for all the reports. The
query prompts for start and end date and a value to filter by from a
table or 'ALL' returns an unfiltered record set.

The report runs just fine and prompts for the values.

The client now wants to select the start and end dates from a calendar
function rather than enter them directly and select the filter from a
drop down box so I have built an unbound form with two calendar
controls, the filter with drop down and a tick box to say don't filter
which sets enabled = false on the filter I have also put a hidden text
field on the form which takes the filter value or 'ALL' if the tickbox
is true.

I can get the query to correctly filter by the parameters on the form
by changing the selection criteria to specifically look at the form but
I may want to use the query again with a different form.

What I really want to do is pass the form values through to the report
and have the filter function on the report override the query
parameters but I cant make it work.

Any ideas what i'm doing wrong and what is the best alternative. I'm
thinking, maybe take the filter criteria out of the main query and
build another query specifically for the report that takes the values
from the form but this is a cop out as far as I am concerned.

We are using Access 2003 on XP Pro SP2

Thanks guys


Obiron

  #2  
Old April 5th, 2006, 07:42 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Access Form values to Report to Query

Take the criteria out of the query and use the WhereCondition parameter
in the DoCmd.OpenReport method. Don't forget to set the FilterOn
property to Yes.

HTH,
Barry

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Report Marilyn New Users 5 March 9th, 2006 06:03 AM
Parameter thru Form Dialog Box for REPORT Sandy Setting Up & Running Reports 16 January 10th, 2006 11:06 AM
Has anyone seen this behaviour? What might it be? tw General Discussion 4 June 30th, 2005 03:23 PM
Need Help In Printing Current Record in Specific Report RNUSZ@OKDPS Setting Up & Running Reports 1 May 16th, 2005 09:06 PM
Display Parameter from Form on Report sara Setting Up & Running Reports 10 July 19th, 2004 04:54 PM


All times are GMT +1. The time now is 03:57 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.