2 part Paramaterized query help

p_nivalis

Active member
Joined
Oct 1, 2004
Messages
33
Programming Experience
5-10
I'm trying to read an access database and let the user pick from two date picker objects, those being the beginning and ending dates, and then return the total amount of money for that time period.

My query looks like this

select sum(Amount) as Total from Transactions where (Date_Serviced >= ?)
and (Date_Serviced <= ?);

I'm having 2 major problems

1. I can get it to work when just using one date, but not two as shown above

2. I can not get the result to display in a label

When I did the query with only 1 date, I was able to display it in a datagrid, but not label.

Also, when I use the 2 date query and I preview the generated dataset from the data adapter, it displays the correct value, but when I run the program it does nothing.

Any help appreciated, Thank You!
 
Back
Top