Aargh! Need some fields to update...

B

Bonnie A

Hello everyone! Using A02 on XP. I have a FeeGenerator DataBase with a
MainForm containing base level contract information and a BillSubForm (to
create annual bills) that contains lots of fee fields as well as 3
subsubforms which displays the totals for; 1. Amendments, 2. Statements
and/or 3. Searches performed during the plan year (from [PYB] to [PYE]).
Sometimes there is data, sometimes there is not for one or all three
subsubforms. I have calculated fields on my BillSubForm that 'read' the
totals from the subsubforms.

One example is:
=IIf(IsError([RPSAdminBillSubPartStmt].[Form]![StmtCount]),0,[RPSAdminBillSubPartStmt].[Form]![StmtCount]).

I need to 'copy' that information (if greater than zero) onto my BillSubForm
into a field named [MailPartStmtCount] to retain in my FeesTable so I can
calculate a charge to print on the bill. Because our
amendment/statement/search subsubform data is only available for a brief
period of time, I need to import a few totals into my bills table to keep a
record of it. This way, if we need to send a follow-up bill, we can
accurately recreate it. With the 3 subsubforms, I have a total of 7 fields
that need to have the 'equals' import run when the bill is initially created,
keyed, edited.

I have created a macro (m.Admin06) where I use --- 'SetValue'; Item
[MailPartStmtCount], Expression [MailPartStmtCopy] --- for each of the 7
fields.

My problem? I can't get it in the right place to make it work. I have
tried to add the macro to my main Valication macro and it seems to skip right
over it. I've added Hourglass=Yes, I've broken the macro into a group with
3 separate macros named. When I do that, I can get the first few fields to
update but the others don't. I've tried to get the macro to run BeforeUpdate
on the first required field. I tried AfterUpdate on the same field. I tried
OnExit on the same field.

Am I even doing this in the best place or event the best way? Should I just
write some code? If so, on what event? I already have the BillSubForm
performing all kinds of code on BeforeInsert, BeforeUpdate, OnDirty, etc.

I suppose what it breaks down to is this question: What is the best method
for a novice to use in order to 'copy' data from an unbound field to a bound
field?

Thank you VERY much for your time and your help.
 

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