473,834 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
14 10636
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.Prevbal ance = Forms!Date!bala nce

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.Cap tion
(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.Prevbal ance = Forms!Date!bala nce

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
2952
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 trying to implement the first method of David Cline: http://www.15seconds.com/issue/981216.htm
2
15432
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
8877
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 NT4.0 machine, which has many Access reports. I want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
11
6611
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 DTS package. If I PC Anywhere into the server on where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
8
10775
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 = 22)" Me.recordsource = "dbo.sproc123" But I can't do this in a report as it will prompt me for the parameters, even though they seem to be defined ahead of the recordsource. I have worked around this by opening reports to a bogus recordsource
15
7269
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 (cache??)/number of records showing in Access? Thank you.
2
3185
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 report writer where the reports already exist). The reports' datasource is a stored procedure with multiple @parameters. This code works where the report requires no parameter: Dim strAccessDBPath As String Dim booReturn As Boolean = False strReportName = "rptCMOTeam1" strAccessDBPath =...
2
6080
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 things from Access Help, MSDN and Google I still can't get it working. I have a query defined (view) and want the end user to put in a start date and end date to filter a report.
1
2386
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 pdf995, makes answering this question that much easier :)
8
4640
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 beautifully every time. However, when I use the wizard to build a report, at the end of the wizard the report opens beautifully, asks for the 2 parameters, and displays results. Beautiful. Then, after closing the report and re-opening, the report promts me for a third, unwanted parameter. ...
0
10512
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9332
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7760
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6957
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5627
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3981
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3083
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.