access form continuous

sekoma

New member
Local time
Today, 23:59
Joined
Jun 28, 2022
Messages
7
i have access continuous form with 2 fields i want calculate sum like this ((first record when i type data1 field1 its =data1 field2 and second record data2 field2 =data1 field2 +data2 field1 ,third record data3 field2 =data2 field2 +data3 field1 and it courteous automatically how to do this in access form

regards
 

Attachments

  • Untitled.png
    Untitled.png
    97.9 KB · Views: 181
hi @sekoma

Reports have a Running Sum property so it's easy there ...

1656434187797.png

Choices are
  • No
  • Over Group
  • Over All

To show a running sum on a form, you need to do a calculation. Easiest would be to use DSum. The problem though, is what if the form is sorted differently? Or there is criteria to consider? Showing a running sum on a form is not so easy.
 
Thanks all
i need this calculation in form because i have data base it contains combo box it linked with subform the subform its view as worksheet ,so in sub form i have amount field and balance when i type a mount it be calculate in balance like excel sheet
 
Thanks all
i need this calculation in form because i have data base it contains combo box it linked with subform the subform its view as worksheet ,so in sub form i have amount field and balance when i type a mount it be calculate in balance like excel sheet
Did you know you can use a report in a subform control?
 
access does not work like excel

so for the second row you would be adding the first and second row, for the third row you would be adding all the records between first and third rows, the next first and fourth, etc

if your subform is not being edited and is just for display you can use a report as a subform
 
thanks for replay
i know create reporting for sub form, and the subform it be add or edit data. so i want record by record give me balance foe exam: for first record i add amount 5 $ it equal balance for second record when i add amount 10 $ the balance field =5+10=15 and third add amount 2$ the balance =15+2=17 thats like the attach photo
regards
 

Attachments

  • Untitled.png
    Untitled.png
    99.2 KB · Views: 164
Last edited:
I mean like this attach photo I taken a pic from other data base
 

Attachments

  • Untitled1.png
    Untitled1.png
    88.4 KB · Views: 172
  • Untitled3.png
    Untitled3.png
    57.2 KB · Views: 162
why not look at how the other database has done it?
 
Thx all for replay

pat hartman how is it too easy can you explain how i can do this with whitch way



regards
 
Open the other form and see what the running sum control is bound to and follow that thread. Or, read the articles I linked to and try to implement on of those solutions.
im using the dsum in vba
BALANCE = DSum("[Amount]", "[QDRDE]", "[INVONO]=" & Me.INVONO)
but i see all balance calculated for all account , so thats I want when i change Unbound cbo.MRC in the main form the subform updated and the balance must calculate only for this account that's show in cbo.mrc the attach photo that explained what i want and thats access i created
regards
 

Attachments

  • data.png
    data.png
    111.9 KB · Views: 173
add an Autonumber field to your Table.
now add this autonumber field to your continuous form,
you can then get the Balance (I used ID as autonumber)

=DSum("[Amount]", "[QDRDE]", "[INVONO]=" & Me.INVONO & " And ID <= " Me!ID)
 
think the code you have posted is not the code you are using

you posted "[INVONO]=" & Me.INVONO

think you are actually using "[INVONO]<=" & Me.INVONO

which is correct

but looks like you need another criteria

"[INVONO]<=" & Me.INVONO & " AND [Account]=" & Me!Account
 
think the code you have posted is not the code you are using

you posted "[INVONO]=" & Me.INVONO

think you are actually using "[INVONO]<=" & Me.INVONO

which is correct

but looks like you need another criteria

"[INVONO]<=" & Me.INVONO & " AND [Account]=" & Me!Account
thanks
i understand at your information and it solved correctly Thank you
 

Users who are viewing this thread

Back
Top Bottom