Being a self taught access programmer I probably do not describe things very
accurately, but I will give it another go. I have a table of
information(tblregistration) which stores student names, id numbers,
addresses, etc... I have another table that has multiple
payments(tblpayments) tracked by date and amount linked by id number. I have
a third table which has variable fields, late fees, early
fees(tbllate/earlyfees) which are yes/no checkboxes and discount which is a
currency field again linked by id number.
I have set up a form which shows all of the tblregistration info, and then 3
subforms, one sub has the tblpayment info, one sub has the tblearly/late fee
info, and the third sub has an expression which sums payments, adds
fees(which have been given currency values in another query dependent on
"yes" or "no"), and then subtracts that amount from one of two numeric values
assigned to the student determinate on whether they are a commuter or
not(another yes/no checkbox in the tblregistration). I call that control
"Amount Due". So my problem is when I enter a value in the payment subform,
or I place a check in a checkbox, in order for the expression "Amount Due" in
the 3rd subform to update, the main form record must be advanced to another
student record and then returned. I tried to solve this by applying a macro
on afterupdate of all variable controls, which updated immediately, but it
threw my main form back to record number 1. So what I am trying to do is let
the user update any of the payment or variable fields and immediately see the
change in the 3rd subform control box of the record they are working in.
I do appreciate your help, and if this still doesn't help, I will quit
buggin you.
Mike
Marshall Barton said:
Sorry, but that's too vague to work with. You need to be
much more specific - What expression? Where is the text
box?
If you have the text box in the subform's footer section and
it's using the Sum function on a field in the subform's
record source table/query, it should work as soon as you
save the record with the new/changed value. If your problem
is that you expect it to recalculate before you save the
record, that probably explains the problem.
--
Marsh
MVP [MS Access]
I tried to use an expression in a textbox, but it will not update the textbox
unless you advance the record and then come back to it. So I tried to run a
query in a macro using the "applyfilter" function. This works, but then sends
me back to the first record in the table, ie... I update in the form while on
record 43 and when the macro runs I am back at record 1.