473,394 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Question regarding Report Parameter

5
Hi guys,

I have Access Project that links to SQL database, I've created report and bind the record source to SQL stored procedure. When I open the report, It always pop up window for entering all parameters.

Can I programatically populates all report parameters in the code ?

I DO NOT WANT to hard coded the query to filter from form's field value, since I want to open the report from multiple forms. Like :
SELECT *
FROM tblCompany
WHERE companyID = [Forms]![FormCompany]!textID

Thanks
Mar 30 '07 #1
3 1388
MMcCarthy
14,534 Expert Mod 8TB
If for example you had a report based on
Expand|Select|Wrap|Line Numbers
  1. SELECT * 
  2. FROM tblCompany
You could then set the filter in the OpenReport statement as follows:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "ReportName", , , "[companyID]=" & Me!textID
or if textID is a text field then

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "ReportName", , , "[companyID]='" & Me!textID & "'"
Mary
Mar 30 '07 #2
trimba
5
Excellent ...

But then If I want to send the report use

DoCmd.SendObject ...

How can you filter the report ?
Mar 30 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Excellent ...

But then If I want to send the report use

DoCmd.SendObject ...

How can you filter the report ?
As long as you don't close the report the filter will not change.
Mar 30 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Herman | last post by:
Hi everyone, I recently installed the Sun J2SE SDK on my machine, and I am having trouble running the java.exe interpreter for my Java compiled code. I remember that I had to set my environment...
6
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
2
by: Randy | last post by:
Whenever I do a query it works correctly on two fields when it is run and brought up in datasheet view, but whenever I attached it to a report it only brings up one parameter that I specified...
18
by: Andre Laplume via AccessMonster.com | last post by:
I have inherited a bunch of dbs which are are shared among a small group in my dept. We typically use the dbs to write queries to extract data, usually dumping it into Excel. Most dbs originated...
0
by: Henry | last post by:
I have written an ASP/VB.Net application via VS 2003 (Crystal V9) that uses MS Access 2000 as its database. I can export reports that have no linked sub reports for printing. However, I'm unable...
3
by: Henry | last post by:
I know it is possible to store dynamic propterties for applications in XML files. The app.config and the web.config files can be used to store AppSettings... I am just wondering how far one can...
0
by: kamboj.shalabh | last post by:
Hi to all, Well, I am working on dotnet 2005 with crystal reports 10 and backend as sql server. I am facing a problem while loading a report. Actually the issue is, when I load report it takes...
0
by: smahaboob | last post by:
Hi, All! My problem: It is necessary to print CR report directly to printer (without preview). For printing I am using Report object. Currently my report has 1 parameter. Can you explain me how...
35
by: JessicaZ | last post by:
Hi everyone! I'm new here and have a question regarding Leban's report to pdf tool. I am working on a database where we are using this code to send a report out to pdf(duh) BUT what I need to do is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.