Opening a Report against a SQL 2000 DB and ...

  • Thread starter Robert Robichaud
  • Start date
R

Robert Robichaud

I'm converting an Access 2000 application to run on SQL 2000.

I have the data in MSDE and trying to get my reports to work. My
rptQuotation report is tied to a Stored Procedure that uses a parameter to
retrive records for the specific order. In the main procedure, I call:

DoCmd.OpenReport "rptQuotation", acPreview

and in the report's Report_Open, I set:

Me.InputParameters = "@OrderID=" & str(2153)

I'm using a specific Order number (2153) for debugging purposes. The
InputParameters is assigned in the report's Report_Open procedure but when
the control is returned to the calling procedure, I get the following:

There was a problem accessing a property or method of the OLE object.

Does anyone have any ideas on this or where to look for a solution?
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You don't have to set the numeric value to a Variant [Str(2153)].

Guessing: It may be better to include the data type declaration in
the InputParameters:

Me.InputParameters = "@OrderID INT = 2153"

And, perhaps, keep spaces between variable name and comparison
operators (=, <>, <=, etc.).

HTH,
- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQB6o/oechKqOuFEgEQIpoACfftGga6+wHGCeHA1QDzRCP+StSJIAoOYZ
V8L5LIxJuTzCbPL9aguZJAP8
=CXBd
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top