Hi all
I Have 3 Queries in access 2 of them are being used as a calculator we willcalled them Cal1 and cal2. The third query The Order query displays the Customer , the orders and totals which consistes of cal1+cal2 (there is a possibilyty of some cells for cal1 or cal2 beinging blank) .
The results of all 3 queries are good.
My Issue is when I read the data from vb.net using oledbreader some of the cells in the total column are null when there is a value in cal1 and not cal2 (ex: 2+0=Null).
Bein 3 queries I did not post them but if you require the or just one of the let me know.
By the way all of my nimeric values are Decimal values.
Hope somw one can help Thanks

Recommended Answers

All 3 Replies

Hello,

You could try making the default value for the fields 0 or you could add 0 to the value of the field in your query to get a result that you add in the sum.

Thanks rch1231 for your reply!
I have substituted the null Values for 0 but still have the same issue .

Thanks again For your help!
I have solded it.
The issue was that one the column names I had in Cal1 That I was doing the calculating was the same column name as one of the tables and some of the cells had the value of 0.
It seamed like that when theprogram was reading the query actuly was using the info that was in the table instead of doing the calculation.
Buy changing the column name in the query all was solded.
Hope this makes since.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.