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

HELP! VB with data report SQL parameter as input?

Status
Not open for further replies.

athos07

Programmer
Aug 1, 2002
19
AU
Im making a program, the program suppose to produce a monthly report using data report in VB, but its not producing any thing.

ive added data environment and command1 as instructed by my boss. and put an sql statement in the command1 -> general tab. I have a criteria MONTH and YEAR for input and also going to use them for output for the displayed month and year.

SELECT [BID/AC].AC, Count([BID/AC].ITBNUMBER) AS CountOfITBNUMBER, Sum([BID/AC].SumOfBIDPRICE) AS SumOfSumOfBIDPRICE
FROM [BID/AC]
WHERE (((Month([biddate]))=[Month]) AND ((Year([biddate]))=[year]))
GROUP BY [BID/AC].AC;

my question is how will i make a code , when i click the command button the data report will show up.

or how can i say that

IF code_month IS EQUAL sql_month
AND
code_year IS EQUAL sql_YEAR
then
show report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top