?
Solved

problem in passing parameters to the report.

Posted on 2003-11-17
6
Medium Priority
?
191 Views
Last Modified: 2010-05-01
Dears,

I'v a problem in passing parameters into the report. i wrote down query in Dataenvironment as passing the item_id like this.
SELECT Date_of_purches, item_Id, SerialNo, supplier,
    Issuedfor
FROM Stock_Detail
WHERE (item_Id = ?)
ORDER BY SerialNo

then pass the parameter like this
    str = Combo1.Text
    DataEnvironment1.command1(str)
    DataReport1.show

when i run the programm it print only one time for perticular selecter item from combo box.but if second time select 4 another item or even same item it wont print. giving error like "operation is not allowed when the object is open!"
can u plz anyone give better solution 2 over come this.

jena..
0
Comment
Question by:kjena
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 9770221
0
 

Expert Comment

by:joyful88
ID: 9776295
to get rid of your object open error write down this:

if DataEnvironment1.rscommand1.State=adStateOpen then DataEnvironment1.rscommand1.Close

** you are closing the recordset of the command, not the command itself
    write this before you call your command.



0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 10163603
Points to emoreau
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 10548617
Moderator, my recommended disposition is:

    Accept emoreau's comment(s) as an answer.

Dan Rollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month11 days, 18 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question