Calculations on values in two forms

A

Anitya

The Problem I face is as under:

I have two forms
1) frmSales - a)Records all the Sales made for the day.(thru
frmDSalesSubform) b) the Cash Received for the day (thru
frmCashRecdSubform).& c) A Control OpCashB (giving the Value of Opening Cash
Balance for the day). The Total Cash Receipts for the Day are then
Calculated in a Control TotalCashR placed on the main parent form-
frmSales.( A separate page for each day's transactions to be recorded)

and

2)frmExp - a)Records all the expenditures incurred on the Day. (Again A
separate page for each day's transactions). b)A Control TotalExp(
Calculating the Total Exp for the Day.) c) Another Control CashLeft =
[TotalCashR]-[TotalExp].

The Problem is
1) Which is the best way to get TotalCashR from frmSales to a control on
frmExp - so as to Calculate CashLeft

2) Which is the best way to get this Value of CashLeft for a day say 1-Jan
reported as OpCashB(Opening Cash Balance) in frmSales for the next day i.e
on the page for 2-Jan in frmSales.

In doing this it is IMPORTANT that
1)If suppose i were to edit the data of any previous date (Say I am editing
the sales figures for 1-Jan on the 2-Feb) the changes should be reflected in
the Controls necessary in each subsequent date i.e.

If I edit the Sales figures on 1-Jan, the Value for TotalCashR for 1-Jan
will change. This should lead to a change in the CashLeft (CashLeft Control
on frmExp=TotalCashR-TotalExp ) value for 1-Jan. And subsequently lead to a
change in the Value of OpCashB for 2-Jan.(CashLeft of 1-Jan is
OpeningCashBalance for 2-Jan). And in this way the CashLeft and OpCashB for
each subsequent day should change accordingly to reflect the changes made.

2) Since a change in any data on the form will lead to so many subsequent
changes.....The form should not be open for editing once the data has been
entered for the day. (How to achieve this?)And, just in case changes or
editing is absolutely essential, how to provide a EDIT Toggle Contol on the
form to enable editing of the Data and then Saving it.

Work Done by me till now
1)The Values of TotalCashR on frmSales and TotalExp on frmExp are saved to a
table say TableX.
2) The CashLeft is Calculated in a Query say QueryY based on TableX
3) From this query the OpCashB for each day is got using the DLookup
Function.

The probem in this method is that the first point I gave above in the "In
doing this it is IMPORTANT that....." section; is not met.
Also, I've not made much headway in Point 2 of the same section i.e. the
point about creating Toggle button to enable editing.

I understand that the mail I've written is quite big. Please excuse me for
it but I couldn't put out problem clearly in fewer words.
If any fallacies are found Please excuse, coz I'm a newbie to Access and all
the stuff that i've done is after reading just a lil of Access 2002 Bible
and lil more of googling.

Actually googling for solutions, solved many of the problems i faced
previously, but somehow i couldn't get a solution to this problem of mine by
googling.

So all the noble souls out there Kindly help. I'll be really grateful.
 

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

Similar Threads


Top