Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 - how to pull certain data for datareport

Status
Not open for further replies.

mackgirl

Programmer
Aug 3, 2000
1
US
I have a datareport that I need to run for a certain value only.  (EX.  User selects Job # 1 from combo box in Form 1 and then report1 is ran for Job # 1 only.)  How can I code the report to only pull data for that job?  I am using a hierarchical data environment.
 
Try This if your using Dataenvironment:
In the command SQL box
SELECT * FROM JOBS WHERE (JOBNUMBER = ?)

then in your program where you call the report add:
Dataenvironment1.command1 (combo1.text)
report.show

I'm going off the top of my head but if thats not it, its REAL close!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top