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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a vale in Data bound report in VB6

Status
Not open for further replies.

pvmurphy

Programmer
Jul 29, 2003
50
US
I'm creating a Data Bound Report in VB6 (against Access 2000 DB), using a DataReport and DataEnvironment, with an SQL Statement as the source of data. Question is how can I pass a value/parameter (ex Invoice No.) to the where clause in the SQL statement to make the report more dynamic.
 
Pretty simple...

In your WHERE clause, put a question mark (?) in place of a value (i.e. WHERE Invoice_No = ?).

There is a Parameters tab next to the General tab in the command properties where you can then setup your parameter that will go in place that the ?.

When you open the report, you simply open it and pass it the parameter it's expecting (i.e. de.report 123)

I hope that helps.

--
Jonathan
 
Thanks Jonathan ,it worked like a charm, I guess I tried to make it more involved than it was. Once again thanks!!

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top