running balance in datagrid

  • Thread starter Thread starter jaypee1978
  • Start date Start date
J

jaypee1978

Anyone know how can I create a running balance in a datagrid? In
MS-Access this could be very simple. This is what my sql in MS-Access
query:

SELECT AccountDetails.AccountDetailID AS AccountDetailIDAlias,
AccountDetails.AccountID, AccountDetails.Date, AccountDetails.Invoice,
AccountDetails.Debit, AccountDetails.Credit,
Format(DSum("[Debit]-[Credit]","AccountDetails","[AccountDetailID]<=" &
[AccountDetailIDAlias]),".00") AS Balance
FROM AccountDetails;

I used OleDbDataAdapter and a dataset to bind a datagrid.

Thanks in advance.
 
jaypee,

This is a VB language code newsgroup. Therefore we are not so interested in
your SQL language code, however in the VB language code that you have used
(and tell what kind of datagrid it is Windowform or Webform)

Probably it is than easy to help you.

Cor
 
I'm using a windowform.
SELECT AccountDetails.AccountDetailID AS AccountDetailIDAlias,
AccountDetails.AccountID, AccountDetails.Date, AccountDetails.Invoice,
AccountDetails.Debit, AccountDetails.Credit,
Format(DSum("[Debit]-[Credit]","AccountDetails","[AccountDetailID]<=" &
[AccountDetailIDAlias]),".00") AS Balance
FROM AccountDetails;

this sql statement is under the selectcommand of oledbdataadapter.

jaypee,

This is a VB language code newsgroup. Therefore we are not so interested in
your SQL language code, however in the VB language code that you have used
(and tell what kind of datagrid it is Windowform or Webform)

Probably it is than easy to help you.

Cor

Anyone know how can I create a running balance in a datagrid? In
MS-Access this could be very simple. This is what my sql in MS-Access
query:

SELECT AccountDetails.AccountDetailID AS AccountDetailIDAlias,
AccountDetails.AccountID, AccountDetails.Date, AccountDetails.Invoice,
AccountDetails.Debit, AccountDetails.Credit,
Format(DSum("[Debit]-[Credit]","AccountDetails","[AccountDetailID]<=" &
[AccountDetailIDAlias]),".00") AS Balance
FROM AccountDetails;

I used OleDbDataAdapter and a dataset to bind a datagrid.

Thanks in advance.
 
Back
Top