B
binny
Okay I've finished my training course on Visual Basic, so I now have basic
training in Visual Basic, so to speak!
My question is this. I have 2 nested subforms and I need some way to get
the totals from the last sub form back to the main form.
I'm using the database to record nominations at a Gymkhana,
One competitor is allowed up to two horses.
Each horse can be nominated in many events.
A competitor can ride twice in and event, but a horse can only run once.
My main form has the competitor details name address etc,
embedded into that is the horse details subform to record the horses name ect.
Embedded into the horse details are sub form is the event details subform.
And it in records the actual details of the events nominated for i.e. flag
race and the nomination fee.
This system is working well, allowing me to produce reports showing which
events a competitor it competing in on what horses they will be riding in
those events.
My problem is this. I would like to be able to keep a running total of the
total nomination costs for both horses on the main form. So that as soon as
someone comes to the Secretary's table. I can tell immediately, how much
they owe and have them pay without the need to print off reports and suchlike.
I can calculate a total nomination cost for the first horse from the events
detail subform. However, when I clicked next record to record the details of
the second horse. The details of the first horse are lost.
Is there some way to insert a calculated control on the main form that will
hold its value after the subform has moved on to the next record.
By the way, if you are nesting more than one subform. YOU HAVE TO MANUALLY
set the parent-child relationship. The wizard will not do it for you
automatically.
That little tidbit is not in the help file, nor in the training course, and
took me six hours to work it out.
binny
training in Visual Basic, so to speak!
My question is this. I have 2 nested subforms and I need some way to get
the totals from the last sub form back to the main form.
I'm using the database to record nominations at a Gymkhana,
One competitor is allowed up to two horses.
Each horse can be nominated in many events.
A competitor can ride twice in and event, but a horse can only run once.
My main form has the competitor details name address etc,
embedded into that is the horse details subform to record the horses name ect.
Embedded into the horse details are sub form is the event details subform.
And it in records the actual details of the events nominated for i.e. flag
race and the nomination fee.
This system is working well, allowing me to produce reports showing which
events a competitor it competing in on what horses they will be riding in
those events.
My problem is this. I would like to be able to keep a running total of the
total nomination costs for both horses on the main form. So that as soon as
someone comes to the Secretary's table. I can tell immediately, how much
they owe and have them pay without the need to print off reports and suchlike.
I can calculate a total nomination cost for the first horse from the events
detail subform. However, when I clicked next record to record the details of
the second horse. The details of the first horse are lost.
Is there some way to insert a calculated control on the main form that will
hold its value after the subform has moved on to the next record.
By the way, if you are nesting more than one subform. YOU HAVE TO MANUALLY
set the parent-child relationship. The wizard will not do it for you
automatically.
That little tidbit is not in the help file, nor in the training course, and
took me six hours to work it out.
binny