showing specific records using vb6 datareport

Reply

Join Date: Oct 2007
Posts: 16
Reputation: TOROOOLOLOOLO is an unknown quantity at this point 
Solved Threads: 0
TOROOOLOLOOLO TOROOOLOLOOLO is offline Offline
Newbie Poster

showing specific records using vb6 datareport

 
0
  #1
Dec 12th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 319
Reputation: DenisOxon is an unknown quantity at this point 
Solved Threads: 15
DenisOxon's Avatar
DenisOxon DenisOxon is offline Offline
Posting Whiz

Re: showing specific records using vb6 datareport

 
0
  #2
Dec 12th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 47
Reputation: 4ukh is an unknown quantity at this point 
Solved Threads: 1
4ukh 4ukh is offline Offline
Light Poster

Re: showing specific records using vb6 datareport

 
0
  #3
Dec 13th, 2008
use ms access query and than use it any where... simple..
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 16
Reputation: TOROOOLOLOOLO is an unknown quantity at this point 
Solved Threads: 0
TOROOOLOLOOLO TOROOOLOLOOLO is offline Offline
Newbie Poster

Re: showing specific records using vb6 datareport

 
0
  #4
Dec 15th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 47
Reputation: 4ukh is an unknown quantity at this point 
Solved Threads: 1
4ukh 4ukh is offline Offline
Light Poster

Re: showing specific records using vb6 datareport

 
0
  #5
Dec 15th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: showing specific records using vb6 datareport

 
0
  #6
Dec 15th, 2008
Right-Click Command Object (Say Command1)
Edit your Command's SQL Query and
make it :
  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:
  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:
  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
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 16
Reputation: TOROOOLOLOOLO is an unknown quantity at this point 
Solved Threads: 0
TOROOOLOLOOLO TOROOOLOLOOLO is offline Offline
Newbie Poster

Re: showing specific records using vb6 datareport

 
0
  #7
Dec 15th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: showing specific records using vb6 datareport

 
0
  #8
Dec 16th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 16
Reputation: TOROOOLOLOOLO is an unknown quantity at this point 
Solved Threads: 0
TOROOOLOLOOLO TOROOOLOLOOLO is offline Offline
Newbie Poster

Re: showing specific records using vb6 datareport

 
0
  #9
Dec 16th, 2008
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")
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: showing specific records using vb6 datareport

 
0
  #10
Dec 17th, 2008
Hi,

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

Regards
Veena
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC