problem with excel-like subform

  • Thread starter forcefield via AccessMonster.com
  • Start date
F

forcefield via AccessMonster.com

I have the following:
Form1:
ItemID (autonumber)
Item (combo)

subForm1:
QtyID (autonumber)
LinkedID (number)
EntryDate (Date)
InQty (number)
OutQty (number)
Balance (unbound)

Child Field is LinkedID and Master Field is ItemID

What I would like to do is when I enter data in the InQty and OutQty in the
subform (similar to Excel) the balance field(unbound) in the subform
automatically calculates the balance (with or without VBA)? Is that possible
with form instead of report? I tried using control source of the Balance
field but the result is left much to be desired. Any idea, please?

Pdate InQty OutQty Balance
02/01/2008 30 4 26
04/01/2008 10 0 36
10/01/2008 20 6 50
12/01/2008 0 2 48

Thanks
 
P

Paolo

Hi forcefield,

In the afterupdate event of InQty and OutQty put
Balance= nz(InQty,0)-nz(OutQty,0)
Be careful, if Balance is left unbound next time you go to an ID the
balance'll be vanished so is better if you add a field to your table to save
the calculated value.

HTH Paolo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top