WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

multiple report parameters (one being dialog box with drop..

 
   Home -> Office other -> Reports RSS
Next:  printer object  
Author Message
p-rat

External


Since: Mar 12, 2008
Posts: 3



(Msg. 1) Posted: Fri Sep 05, 2008 9:06 am
Post subject: multiple report parameters (one being dialog box with drop down)
Archived from groups: microsoft>public>access>reports (more info?)

I have a report I'm doing that is collecting data from a query. I have
'date in' and 'date out' parameters. I also have a form I created with
a drop down getting data from a table. The query that the report
dependent upon has the BETWEEN [date in] AND [date out]. When run it
pulls back correct data set. I have a field called 'location' which my
form which looks like a dialog box is dependent upon.

When I run these three parameters on the report the 'date in' window
pops up, the 'date out' window pops up, but then there is a parameter
window which has form!locationselect!combo1 on it that pops up instead
of the form I created for this.

I'm new to this and have looked throughout discussions for an answer.
Could anyone point me in the right direction? It would be greatly
appreciated. Thanks.
Back to top
Login to vote
fredg

External


Since: Jan 30, 2004
Posts: 4625



(Msg. 2) Posted: Fri Sep 05, 2008 9:31 am
Post subject: Re: multiple report parameters (one being dialog box with drop down) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 5 Sep 2008 09:06:23 -0700 (PDT), p-rat wrote:

> I have a report I'm doing that is collecting data from a query. I have
> 'date in' and 'date out' parameters. I also have a form I created with
> a drop down getting data from a table. The query that the report
> dependent upon has the BETWEEN [date in] AND [date out]. When run it
> pulls back correct data set. I have a field called 'location' which my
> form which looks like a dialog box is dependent upon.
>
> When I run these three parameters on the report the 'date in' window
> pops up, the 'date out' window pops up, but then there is a parameter
> window which has form!locationselect!combo1 on it that pops up instead
> of the form I created for this.
>
> I'm new to this and have looked throughout discussions for an answer.
> Could anyone point me in the right direction? It would be greatly
> appreciated. Thanks.

Do all of the parameter inputting on a form. You won't receive any
prompt.

First, create a query that will display the fields you wish to show in
the report.

Second, create a report, using the query as it's record source, that
shows the data you wish to display for ALL records.

Let's assume it is a LocationID number you need as criteria, as well
as a starting and ending date range.

Next, make a new unbound form.
Add a combo box that will show the LocationID field as well as the
Location Name field (you can use the Combo Box wizard to do so).
Set the Combo box's Column Count property to 2.
Hide the LocationID field by setting the Combo box's ColumnWidth
property to 0";1"
Make sure the Combo Box Bound Column is the
LocationID field.
Name this Combo Box "cboLocation".

Add 2 unbound text controls to the form.
Set their Format property to any valid date format.
Name one "StartDate".
Name the other "EndDate".

Add a command button to the form.
Code the button's Click event:
Me.Visible = False
Name this form "ParamForm"

Go back to the query. As criteria, on the Query's LocationID field
criteria line write:
forms!ParamForm!cboLocation

As Criteria on the DateField, write:
Between forms!ParamForm!StartDate and forms!ParamForm!EndDate

Code the Report's Open Event:
DoCmd.OpenForm "ParamForm" , , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"

Run the Report.
The report will open the form.

Find the Location Name in the combo box.
Enter the starting and ending dates.
Click the command button.

The Report will display just those records selected.
When the Report closes it will close the form.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Back to top
Login to vote
p-rat

External


Since: Mar 12, 2008
Posts: 3



(Msg. 3) Posted: Fri Sep 05, 2008 11:06 am
Post subject: Re: multiple report parameters (one being dialog box with drop down) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 5, 11:31 am, fredg <fgutk... RemoveThis @example.invalid> wrote:
> On Fri, 5 Sep 2008 09:06:23 -0700 (PDT), p-rat wrote:
> > I have a report I'm doing that is collecting data from a query. I have
> > 'date in' and 'date out' parameters. I also have a form I created with
> > a drop down getting data from a table. The query that the report
> > dependent upon has the BETWEEN [date in] AND [date out]. When run it
> > pulls back correct data set. I have a field called 'location' which my
> > form which looks like a dialog box is dependent upon.
>
> > When I run these three parameters on the report the 'date in' window
> > pops up, the 'date out' window pops up, but then there is a parameter
> > window which has form!locationselect!combo1 on it that pops up instead
> > of the form I created for this.
>
> > I'm new to this and have looked throughout discussions for an answer.
> > Could anyone point me in the right direction? It would be greatly
> > appreciated. Thanks.
>
> Do all of the parameter inputting on a form. You won't receive any
> prompt.
>
> First, create a query that will display the fields you wish to show in
> the report.
>
> Second, create a report, using the query as it's record source, that
> shows the data you wish to display for ALL records.
>
> Let's assume it is a LocationID number you need as criteria, as well
> as a starting and ending date range.
>
> Next, make a new unbound form.
> Add a combo box that will show the LocationID field as well as the
> Location Name field (you can use the Combo Box wizard to do so).
> Set the Combo box's Column Count property to 2.
> Hide the LocationID field by setting the Combo box's ColumnWidth
> property to 0";1"
> Make sure the Combo Box Bound Column is the
> LocationID field.
> Name this Combo Box "cboLocation".
>
> Add 2 unbound text controls to the form.
> Set their Format property to any valid date format.
> Name one "StartDate".
> Name the other "EndDate".
>
> Add a command button to the form.
> Code the button's Click event:
> Me.Visible = False
> Name this form "ParamForm"
>
> Go back to the query. As criteria, on the Query's LocationID field
> criteria line write:
> forms!ParamForm!cboLocation
>
> As Criteria on the DateField, write:
> Between forms!ParamForm!StartDate and forms!ParamForm!EndDate
>
> Code the Report's Open Event:
> DoCmd.OpenForm "ParamForm" , , , , , acDialog
>
> Code the Report's Close event:
> DoCmd.Close acForm, "ParamForm"
>
> Run the Report.
> The report will open the form.
>
> Find the Location Name in the combo box.
> Enter the starting and ending dates.
> Click the command button.
>
> The Report will display just those records selected.
> When the Report closes it will close the form.
> --
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail- Hide quoted text -
>
> - Show quoted text -

Thank you Fred. It worked great. You are THE man!
Back to top
Login to vote
Allen Browne

External


Since: Nov 08, 2003
Posts: 9629



(Msg. 4) Posted: Sat Sep 06, 2008 12:27 am
Post subject: Re: multiple report parameters (one being dialog box with drop down) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In your query, try:
[Forms]![locationselect]![combo1]

The form must be named locationselect (without a space), and the combo named
combo1. If the form is open, it is part of the Forms collection (which is
why you need the S at the end of formS.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"p-rat" <osupratt.TakeThisOut@yahoo.com> wrote in message
news:252b3def-a9e8-4bc8-a444-94515d7c7637@b1g2000hsg.googlegroups.com...
>I have a report I'm doing that is collecting data from a query. I have
> 'date in' and 'date out' parameters. I also have a form I created with
> a drop down getting data from a table. The query that the report
> dependent upon has the BETWEEN [date in] AND [date out]. When run it
> pulls back correct data set. I have a field called 'location' which my
> form which looks like a dialog box is dependent upon.
>
> When I run these three parameters on the report the 'date in' window
> pops up, the 'date out' window pops up, but then there is a parameter
> window which has form!locationselect!combo1 on it that pops up instead
> of the form I created for this.
>
> I'm new to this and have looked throughout discussions for an answer.
> Could anyone point me in the right direction? It would be greatly
> appreciated. Thanks.
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Reports All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET