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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using Form for Criteria for Report



 
 
Thread Tools Display Modes
  #1  
Old August 10th, 2009, 08:17 PM posted to microsoft.public.access.reports
Basenji
external usenet poster
 
Posts: 61
Default Using Form for Criteria for Report

Using Access 2003 I have created a form with two text boxes to enter start
and end dates for the criteria for a report. The report is made up of
subreports that have no connection. The reports were inserted into a blank
report. I would like for the criteria, the start and end date, that is
entered in the form to return the data for all of the subreports without
having to enter the same criteria, start and end dates, for each report when
the parameter is part of each query. So far when I enter the dates it returns
data outside of the date range. So in my header where I have controls to show
the date range it shows the date range that has been entered, but in the
records that are returned there are dates outside of the dates entered in the
criteria. Is it possible to do this? If so, what do you suggest?
Thank you.
  #2  
Old August 10th, 2009, 08:21 PM posted to microsoft.public.access.reports
Klatuu
external usenet poster
 
Posts: 7,074
Default Using Form for Criteria for Report

You can add references to the form's controls for the record source for each
sub report and the main report:

WHERE [StartDate] BETWEEN Forms!MyForm!txtStartDate AND
Forms!MyForm!txtEndDate
--
Dave Hargis, Microsoft Access MVP


"Basenji" wrote:

Using Access 2003 I have created a form with two text boxes to enter start
and end dates for the criteria for a report. The report is made up of
subreports that have no connection. The reports were inserted into a blank
report. I would like for the criteria, the start and end date, that is
entered in the form to return the data for all of the subreports without
having to enter the same criteria, start and end dates, for each report when
the parameter is part of each query. So far when I enter the dates it returns
data outside of the date range. So in my header where I have controls to show
the date range it shows the date range that has been entered, but in the
records that are returned there are dates outside of the dates entered in the
criteria. Is it possible to do this? If so, what do you suggest?
Thank you.

  #3  
Old September 14th, 2009, 09:41 PM posted to microsoft.public.access.reports
Basenji
external usenet poster
 
Posts: 61
Default Using Form for Criteria for Report

Right now the record source for the report is a query. So to make sure I
understand, the record soruce for the report should take the form you are
suggesting?

"Klatuu" wrote:

You can add references to the form's controls for the record source for each
sub report and the main report:

WHERE [StartDate] BETWEEN Forms!MyForm!txtStartDate AND
Forms!MyForm!txtEndDate
--
Dave Hargis, Microsoft Access MVP


"Basenji" wrote:

Using Access 2003 I have created a form with two text boxes to enter start
and end dates for the criteria for a report. The report is made up of
subreports that have no connection. The reports were inserted into a blank
report. I would like for the criteria, the start and end date, that is
entered in the form to return the data for all of the subreports without
having to enter the same criteria, start and end dates, for each report when
the parameter is part of each query. So far when I enter the dates it returns
data outside of the date range. So in my header where I have controls to show
the date range it shows the date range that has been entered, but in the
records that are returned there are dates outside of the dates entered in the
criteria. Is it possible to do this? If so, what do you suggest?
Thank you.

  #4  
Old September 14th, 2009, 10:46 PM posted to microsoft.public.access.reports
Klatuu
external usenet poster
 
Posts: 7,074
Default Using Form for Criteria for Report

It should be part of your query.
--
Dave Hargis, Microsoft Access MVP


"Basenji" wrote:

Right now the record source for the report is a query. So to make sure I
understand, the record soruce for the report should take the form you are
suggesting?

"Klatuu" wrote:

You can add references to the form's controls for the record source for each
sub report and the main report:

WHERE [StartDate] BETWEEN Forms!MyForm!txtStartDate AND
Forms!MyForm!txtEndDate
--
Dave Hargis, Microsoft Access MVP


"Basenji" wrote:

Using Access 2003 I have created a form with two text boxes to enter start
and end dates for the criteria for a report. The report is made up of
subreports that have no connection. The reports were inserted into a blank
report. I would like for the criteria, the start and end date, that is
entered in the form to return the data for all of the subreports without
having to enter the same criteria, start and end dates, for each report when
the parameter is part of each query. So far when I enter the dates it returns
data outside of the date range. So in my header where I have controls to show
the date range it shows the date range that has been entered, but in the
records that are returned there are dates outside of the dates entered in the
criteria. Is it possible to do this? If so, what do you suggest?
Thank you.

 




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 06:24 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.