943,923 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Dec 12th, 2008
0

showing specific records using vb6 datareport

Expand Post »
Hi
I have a problem,
i have designed a database program with vb6 and ms access. and the program is suppose to display specific records using datareport. eg ,display records of student whose fees are> 10000. But i dont know my way out. hope to get help from anybody.thanks in advance.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
TOROOOLOLOOLO is offline Offline
16 posts
since Oct 2007
Dec 12th, 2008
0

Re: showing specific records using vb6 datareport

Hi,

I have done it the past by having a query in Access that returns the wanted records. Then call that query from VB and display/access the records.

Hope this helps

Denis
Reputation Points: 22
Solved Threads: 19
Posting Whiz
DenisOxon is offline Offline
345 posts
since Jan 2007
Dec 13th, 2008
0

Re: showing specific records using vb6 datareport

use ms access query and than use it any where... simple..
Reputation Points: 13
Solved Threads: 1
Junior Poster in Training
4ukh is offline Offline
70 posts
since May 2008
Dec 15th, 2008
0

Re: showing specific records using vb6 datareport

Hi
I am still not clear.the fact is that my program has two command buttons, one button is supose to display records with FEES < 2000
and the other button is also supose to display FEES>2000.
I realy need help.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
TOROOOLOLOOLO is offline Offline
16 posts
since Oct 2007
Dec 15th, 2008
0

Re: showing specific records using vb6 datareport

in ms access design your query in design view add your table into the query window and than double click on the fields which you may need for the query like fees of the student and in the criteria row just write the condition < 2000 under the fees column and than save and run the query hope this will help if not just let us know...

thank you
Reputation Points: 13
Solved Threads: 1
Junior Poster in Training
4ukh is offline Offline
70 posts
since May 2008
Dec 15th, 2008
0

Re: showing specific records using vb6 datareport

Right-Click Command Object (Say Command1)
Edit your Command's SQL Query and
make it :
vb Syntax (Toggle Plain Text)
  1. Select * From MyTable Where Fees Between ? And ?
Click on apply

Parameter Tab Is Enabled, Go there..
Set these properties for both Parameters:
DataType = adDoble
HostDataType =Currency
And Apply,
Save the Project

In The Calling Form, For <2000 buttonClick, write this code:
vb Syntax (Toggle Plain Text)
  1. Load DataEnvironment1
  2. With DataEnvironment1
  3. If .rsCommand1.State <> 0 Then .rsCommand1.Close
  4. .Command1 0, 2000
  5. End With
  6. DataReport1.Show

In The Calling Form, For between 2000 to 10000 buttonClick, write this code:
vb Syntax (Toggle Plain Text)
  1. Load DataEnvironment1
  2. With DataEnvironment1
  3. If .rsCommand1.State <> 0 Then .rsCommand1.Close
  4. .Command1 2001, 10000
  5. End With
  6. DataReport1.Show

I HOPE IT IS CLEAR..

Regards
Veena
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Dec 15th, 2008
0

Re: showing specific records using vb6 datareport

Thanks QVeen72. I apreciate your help. but i dont know what you mean by "Right-Click Command Object (Say Command1) and Parameter Tab ". i dont know where to locate and right click Command Object . pls be precise, i am naive. hope to hear from you.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
TOROOOLOLOOLO is offline Offline
16 posts
since Oct 2007
Dec 16th, 2008
0

Re: showing specific records using vb6 datareport

Hi,

I Guess, you have created the DataReport, based on a COMMAND Object in DataEnvironment, You have to do the above process for that Command Object

Regards
Veena
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Dec 16th, 2008
0

Re: showing specific records using vb6 datareport

Thanks QVeen72. I apreciate your help.but after doing what u asked me to do, it gives me a compile error ("Member or data Member not found")
Reputation Points: 10
Solved Threads: 0
Newbie Poster
TOROOOLOLOOLO is offline Offline
16 posts
since Oct 2007
Dec 17th, 2008
0

Re: showing specific records using vb6 datareport

Hi,

What Line you are getting the error..? Post your Code Here..

Regards
Veena
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB: Connect to Access database via ODBC datasource name
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How to generate auto number





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC