472,333 Members | 1,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 software developers and data experts.

Access Report / Sub report with parameters



I have a report with a sub report for an income / expense report for
church. My expense report is the sub report.
My question is, when I run the report, it prompts me 2-3 times for the
parameters of the expense report. Is there a way around this annoyance?
Thank you for your help.

Scott

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
14 10461
How are you defining these parameters?

"Scott Gorman" <sg***@comcast.net> wrote in message
news:41**********@127.0.0.1...


I have a report with a sub report for an income / expense report for
church. My expense report is the sub report.
My question is, when I run the report, it prompts me 2-3 times for the
parameters of the expense report. Is there a way around this annoyance?
Thank you for your help.

Scott

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #2
In the query, I have a column with the following entries.

Field- Month([Date])
Sort- Expression
Criteria- [Expense Report for month: 1-12: ]

When I run this query on its own, it works fine. The problem seems to be
when I have this query in my report as a sub report. It currently is
prompting me 2 times for this data. Not sure how I changed it, but it
was prompting me 3 times before.
Thanks,
Scott

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
I'd suggest you take the criteria line out of the query.
Instead, put a textbox on your main form to enter the month you want.
Then use the LinkMasterFields and LinkChildFields properties of your subform
control to take care of your filtering.
"Scott Gorman" <sg***@comcast.net> wrote in message
news:41**********@127.0.0.1...
In the query, I have a column with the following entries.

Field- Month([Date])
Sort- Expression
Criteria- [Expense Report for month: 1-12: ]

When I run this query on its own, it works fine. The problem seems to be
when I have this query in my report as a sub report. It currently is
prompting me 2 times for this data. Not sure how I changed it, but it
was prompting me 3 times before.
Thanks,
Scott

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #4


I am not sure how to do that. Could you possibly help me to get that
started. I sure appreciate your help

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #5

"Scott Gorman" <sg***@comcast.net> wrote in message
news:42**********@127.0.0.1...


I am not sure how to do that. Could you possibly help me to get that
started. I sure appreciate your help

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #6
1. I'd suggest you take the criteria line out of the query.
2. Instead, put a textbox on your main form to enter the month you want.
3. Then use the LinkMasterFields and LinkChildFields properties of your
subform
control to take care of your filtering

Sorry, I'm not sure where I need to be clearer.
Which line of my instructions is unclear?
Could you be more specific in the help you'd like?
"Scott Gorman" <sg***@comcast.net> wrote in message
news:42**********@127.0.0.1...


I am not sure how to do that. Could you possibly help me to get that
started. I sure appreciate your help

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #7

Sorry for being so unclear.
OK. I have taken the parameter out of the query. Now, when I open the
report, I get all the dates, and do not get the parameters I want.
I am trying to create a form that will open when the report is opened
that I can put the date range I want to see.
I can not figure out how to link the "Date" form to the query and then
to the report to tie it all together.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #8
OK, that's quite different from the report/subreport setup you first
described.

Do you have parameters other than the date?
Do you have a form, perhaps with a button, from which you open this report?
Or are you opening it directly from the database window?

"Scott Gorman" <sg***@comcast.net> wrote in message
news:42**********@127.0.0.1...

Sorry for being so unclear.
OK. I have taken the parameter out of the query. Now, when I open the
report, I get all the dates, and do not get the parameters I want.
I am trying to create a form that will open when the report is opened
that I can put the date range I want to see.
I can not figure out how to link the "Date" form to the query and then
to the report to tie it all together.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #9
The only criteria I am pulling out is the date range
I have a switchboard from which to open the report from.
I was able to create a form that I am able to have open when the report
opens to input the parameters in now. Seems to be working ok.
The last thing I would like to be able to do is....
I have a text box in the report that prompts to "input last months
balance". This prompt comes up after my form to input the date range. If
I add this to my form, how do I link it to fill in on the report?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #10
Here's one way:
Put a label on the report.
In the report_open event, set the label's caption to the value of the
textbox:
MyLabel.Caption = Forms!InputForm!txtBalance

HTH

"Scott Gorman" <sg***@comcast.net> wrote in message
news:42**********@127.0.0.1...
The only criteria I am pulling out is the date range
I have a switchboard from which to open the report from.
I was able to create a form that I am able to have open when the report
opens to input the parameters in now. Seems to be working ok.
The last thing I would like to be able to do is....
I have a text box in the report that prompts to "input last months
balance". This prompt comes up after my form to input the date range. If
I add this to my form, how do I link it to fill in on the report?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #11


MyLabel.Prevbalance = Forms!Date!balance

This is the code I placed in the On open event procedure.
Prevbalance is the name of the text box, and balance is the name of the
box on the form where you input the previous balance.
When it runs, it errors out and says - run time error '424' Object
required.
Can you tell me where I went wrong.
Thanks for you patience with me...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #12
I think you've got the syntax on the right side of the equals sign right,
except for my advice in # 4 below. But there are several problems on the
left side.

1. My instructions were to place a label on the report.
It looks as if you used a textbox.
Use a label.

2. When giving instructions such as "Create a Label. Set its properties
thus:", it's common to refer to the label as MyLabel.
The expectation is that the user will substitute the name of his/her
own label.

3. I instructed you to use the Caption property of the label.
If you have a label named Prevbalance, the syntax would be
Prevbalance.Caption
(If Prevbalance is a textbox, this will cause an error, because a
textbox doesn't have a Caption property.)

Since you have nothing on your report named MyLabel, and have an
instruction to Access to do something to MyLabel, it's understandable that
Access says "Object required", i.e. "I/you need an object named MyLabel."

4. This is not something I'd told you about before, but it looks as if your
form is named Date. Date is a reserved word in Access, which means Access
may have its own opinion as to the meaning of that term, which may well not
co-incide with yours. Personally, I avoid this problem by always starting
my form names with frm, so I would have called this form frmDate. You could
just as well name it DateForm, or DateRange. But naming it (or anything
else) just Date is asking for trouble you don't need.
"Scott Gorman" <sg***@comcast.net> wrote in message
news:42**********@127.0.0.1...


MyLabel.Prevbalance = Forms!Date!balance

This is the code I placed in the On open event procedure.
Prevbalance is the name of the text box, and balance is the name of the
box on the form where you input the previous balance.
When it runs, it errors out and says - run time error '424' Object
required.
Can you tell me where I went wrong.
Thanks for you patience with me...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #13


Thank you. I am beginning to get it through my thick head.

I was able to get the label to work, and I have renamed my form to
dateform.
What would the syntax be to set the format so it would look like the
following. $1,111.11 ?
Also, I had a formula set in another text box to take the previous
balance + income - expenses to come up with the new balance forward.
Seems as though I am getting an error now that I replaced my old text
box with the new label.
Should I create this formula in syntax code as well?

Thank you again,

Scott

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #14
The Access Help file has a pretty good description of the Format() function.
I suggest you look there to learn its syntax.

Now that you have a label instead of a textbox, you'll need to use its
..Caption property whenever you want to reference the text it displays. This
may be what's causing the error in your calculations.
"Scott Gorman" <sg***@comcast.net> wrote in message
news:42**********@127.0.0.1...


Thank you. I am beginning to get it through my thick head.

I was able to get the label to work, and I have renamed my form to
dateform.
What would the syntax be to set the format so it would look like the
following. $1,111.11 ?
Also, I had a formula set in another text box to take the previous
balance + income - expenses to come up with the new balance forward.
Seems as though I am getting an error now that I replaced my old text
box with the new label.
Should I create this formula in syntax code as well?

Thank you again,

Scott

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joris Kempen | last post by:
Hi people, I know that the question has come around sometimes: How to open an Access Report using ASP and export it to for example RTF. I'm...
2
by: Tom Weddell | last post by:
Can I call an Access report from VB.Net? (I'm using access as the backend.) Thanks in advance.
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this...
8
by: lauren quantrell | last post by:
When I open an Access form I can have no recordset specified, then in the form's OnOpen event I can do something like: Me.paramaters = "@SomeColumn...
15
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size...
2
by: Dean Slindee | last post by:
I would like to pass multiple parameters from a VB.NET application to an existing Access 2003 application's reports (essentially using Access as a...
2
by: Andy | last post by:
Hi guys I having a problem creating a report in Access 2003 project talking to a SQL database through and ODBC connect. After hours of trying...
1
by: Gilberto | last post by:
pks00 Expert 280 Posts April 16th, 2007 01:08 PM Re: How to print MS Access 2000 report to PDF995 printer by VBA Code Sweet, your using...
8
by: DanicaDear | last post by:
I have something interesting...looking to see if anyone else has came across this. I have a query with parameter and and the query works...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.