473,651 Members | 3,036 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating parameter report in Access 2003 project (ADP)

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.

I tried creating a parameter on the Criteria line of the query but got
this error:

'[Start Date:]' in expression is not part of the query.

Alternatively, I tried this line the query:

'WHERE (dbo.Case.Repor tDate BETWEEN @StartDate AND @EndDate)'

and got this error 'ADO error: Must declare the variable '@StartDate'

I'm stumped...any ideas please.

Thanks....Andre w

Jun 14 '07 #1
2 6068
On Thu, 14 Jun 2007 00:05:16 -0700, Andy <an******@hotma il.comwrote:

Turn the view into a stored procedure that takes two input parameters,
and set those values in the InputParameters property of the report.

Btw, if you're using an Access Project (adp), you're not using ODBC.

-Tom.

>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.

I tried creating a parameter on the Criteria line of the query but got
this error:

'[Start Date:]' in expression is not part of the query.

Alternativel y, I tried this line the query:

'WHERE (dbo.Case.Repor tDate BETWEEN @StartDate AND @EndDate)'

and got this error 'ADO error: Must declare the variable '@StartDate'

I'm stumped...any ideas please.

Thanks....Andr ew
Jun 14 '07 #2
Thanks Tom

I was trying to avoid using stored procedures because I don't have
permission add stored procedures directly to the database (have to go
through a labourious procedure through IT.)...but I can create views.
My reading of parameter queries/views was that I should have been able
to create these from the Access 2003 interface...whi ch is where I got
the errors?

Another thought, can I create a stored procedure where I pass a table
name and date parameters to return a recordset from a chosen table.
In this way I could then use that stored procedure as the basis of any
report (access front end - SQL backend, relatively few records <
1000)??

thanks for your response....And y

P.S. I got confused...I am using a DSN...not ODBC.
On Jun 15, 12:25 am, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
On Thu, 14 Jun 2007 00:05:16 -0700, Andy <anzac...@hotma il.comwrote:

Turn the view into a stored procedure that takes two input parameters,
and set those values in the InputParameters property of the report.

Btw, if you're using an Access Project (adp), you're not using ODBC.

-Tom.
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.
I tried creating a parameter on the Criteria line of the query but got
this error:
'[Start Date:]' in expression is not part of the query.
Alternatively, I tried this line the query:
'WHERE (dbo.Case.Repor tDate BETWEEN @StartDate AND @EndDate)'
and got this error 'ADO error: Must declare the variable '@StartDate'
I'm stumped...any ideas please.
Thanks....Andre w- Hide quoted text -

- Show quoted text -

Jun 18 '07 #3

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

Similar topics

3
6115
by: *no spam* | last post by:
I want to move my Access 2K database into MSDE. The Access Upsizing Wizard crashes (a known bug wi A2K), so I'm using the following suggested method: Access --> New --> Project (Existing Database) This asks for the name of the .adp file to create and then launches into the Data Link Properties dialog box (so far so good) I select my MSDE server from the drop-down, enter the sa account & passwd, attach a database file and try to...
7
6408
by: rickcheney | last post by:
I just changed my Access 2002 database to a SQL Server ADP project. I had a form where the user entered a value into a text box and when a command button on the form was clicked a Report was opened. The reports record source is a query. The query uses the value from the form text box to restrict the query. Table name = EggsTable one of the columns in the table is named: EggColor Form name = EggColorForm Form text box name = ColorTextBox
4
5367
by: sherkozmo | last post by:
SQL2000 - AccessXP I built an adp file with a stored procedure from SQL as follows: SELECT * FROM Z_mis_sjk_job_code_access WHERE job_code=@JobCode UNION ALL SELECT * FROM Z_mis_sjk_job_code_access_mkey WHERE job_code=@JobCode ORDER BY app_only, submenu_number, menu_routine_number,
28
2638
by: Neil Ginsberg | last post by:
I have a client who is using Access 2002/2000 (the database itself is written in 2000), and is considering migrating to Access 2003. Any recommendations on whether Access 2003 is worth the migrate, or should he stick with 2002? Thanks! Neil
1
2848
by: Matt Alanzo | last post by:
On another newsgroup an Access knowledgable party posted: >You should be able to connect an Access ADP to an existing SQLExpress >database running in SQLS 2000 compatibility mode. The only thing you >won't be able to do is access any of the design surfaces for SQLS >objects in the ADP. I checked with the Access team on this :-) > I appealed for clarification but without reply. Maybe somone on this newsgroup can provide insight.
6
2788
by: Donald Grove | last post by:
I do programming in Access 2000 and 2003. I don't have a copy of 2003 myself, though. I have read about the adp software that comes with Access 2003, that converts an application to an access front end with a SQL server backend. It sounds like a good way for me to begin to learn about SQL server. I have thought about just shelling out the bucks for a copy of Access 2003, but the adp software is really the only reason. Do the folks
3
3171
by: gabry.morelli | last post by:
Hi everybody, I wanted to start an application using the MS Access 2003 Project, but as I create an .adp file it asks me to connect to a SQL Server. But I needed to create the dabase directly inside the adp project. Is that possible? If so, what's the procedure to create it? Thank you for your help.
1
5079
by: Ted Kennedy | last post by:
I have an Access Data Project (.adp) connecting to a SQL Server 2005 DB over the internet. The project has been running in Access 2003 for a couple of years, and performance has been very good. When I convert it to Access 2007 (maintaining the 2002-2003 file format) it gets a LOT slower. It takes about 3-5 seconds just to tab to a new field. Everything seems to work, it's just as if it is moving in molasses. Any ideas on what could be...
5
5217
by: Matthew Wells | last post by:
Is there any way at all in Access 2003 to bind a report to an ADO recordset? The closest I've come so far is to use a pass through query that gets a table based UDF- but that's still not optimal since it's a pain to use paramaters. Thanks. -- Matthew.Wells Matthew.Wells@FirstByte.net
0
8278
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8807
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8701
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
8584
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7299
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...
0
5615
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
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
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
1588
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.