
03-09-2004, 06:04 PM
|
 |
Junior Contributor
|
|
Join Date: Jul 2003
Location: Tondo Philippines
Posts: 313
|
|
problem with getting the total from a table
|
i have a table named charges and it is related in a master table, the charges table is too big, it has the size of about 98 mb, when i execute a query (rom DAO or ADO) like
query = "SELECT sum(amt) as [sum_amt], item_code FROM charges WHERE pk = '" & myPkey & "' GROUP BY item_code"
the computer hangs up, but if the table charges is not that big like 30 mb it run smoothly, so i decided to create a function for this. but ive got no idea of it, any idea on this, im thinking of comparing the previous, next, and present record inside a loop statement. 
|
__________________
On Error Resume Next
If Code = vb Then
use [vb] [/vb]
End If
|