By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

Need help with placing value into subform

P: n/a
Using A2K. I've got a form with 2 subforms (a subform within a
subform). When the user enters an amount on the main form, I place
that amount in subform1 with no problem but can't seem to get it
placed in subform2 correctly. It remains zero.

Below explains it better hopefully:

Amount: $25 <user enters amount and it gets placed in subform1
amount>
<Subform 1> Fund #: <blank until user enters> Amount: $25
<subform 2> Object code: <blank until user enters> Amount:
<want $25 placed here>

Here's my code to place the amount in subform1 and subform2:

<in AfterUpdate event of Amount field>
Me.subfrmBatchFunds!txtAmount = Me.txtCheckAmount
Me.subfrmBatchFunds.Form!subfrmBatchObjectCodes.Fo rm!txtAmount =
Me.txtCheckAmount

If I enter the fund # and object code first, then go back and enter
the amount, THEN the amount gets placed in subform2. But that's not
the
logical flow of data entry here.

Any help or advice is appreciated.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Ellen,

I'm not sure why you need to store this value in (3?) tables, but here's a
bit of a "cheat" that may work for you.

Try using your LinkMaster / LinkChild fields to "force" the (Amount) value
to be inseted into new records.
Add a colon and "Amount" to your existing link fields...

i.e Link Master YourExistingLinkField; Amount
Link Child YourExistingLinkField; Amount

Do this for both sets of links. [From Mainform to SubForm1, as well as
from SubForm1 to SubForm2]

After entering anything in a new record the "Amount" should also be
inserted. You should now be able to delete the existing code in your
AfterUpdate event. You may have to add a Me.Refresh there instead?

"Ellen Manning" <ma**********@hotmail.com> wrote in message
news:da*************************@posting.google.co m...
Using A2K. I've got a form with 2 subforms (a subform within a
subform). When the user enters an amount on the main form, I place
that amount in subform1 with no problem but can't seem to get it
placed in subform2 correctly. It remains zero.

Below explains it better hopefully:

Amount: $25 <user enters amount and it gets placed in subform1
amount>
<Subform 1> Fund #: <blank until user enters> Amount: $25
<subform 2> Object code: <blank until user enters> Amount:
<want $25 placed here>

Here's my code to place the amount in subform1 and subform2:

<in AfterUpdate event of Amount field>
Me.subfrmBatchFunds!txtAmount = Me.txtCheckAmount
Me.subfrmBatchFunds.Form!subfrmBatchObjectCodes.Fo rm!txtAmount =
Me.txtCheckAmount

If I enter the fund # and object code first, then go back and enter
the amount, THEN the amount gets placed in subform2. But that's not
the
logical flow of data entry here.

Any help or advice is appreciated.

Nov 13 '05 #2

P: n/a
The user wanted a default value for fund amount and object code
amount. 75% of the time, there will be only one fund and one object
code, both with the same amount. The other 25%, there will be
multiple funds and multiple object codes, all with different amounts
but that add up to the amount on the main form.

I wasn't able to get your suggestion to work initially. Will be
working on it more today. Thanks for your reply.
"Don Leverton" <le****************@telusplanet.net> wrote in message news:<zaDGc.62308$_5.55427@clgrps13>...
Hi Ellen,

I'm not sure why you need to store this value in (3?) tables, but here's a
bit of a "cheat" that may work for you.

Try using your LinkMaster / LinkChild fields to "force" the (Amount) value
to be inseted into new records.
Add a colon and "Amount" to your existing link fields...

i.e Link Master YourExistingLinkField; Amount
Link Child YourExistingLinkField; Amount

Do this for both sets of links. [From Mainform to SubForm1, as well as
from SubForm1 to SubForm2]

After entering anything in a new record the "Amount" should also be
inserted. You should now be able to delete the existing code in your
AfterUpdate event. You may have to add a Me.Refresh there instead?

"Ellen Manning" <ma**********@hotmail.com> wrote in message
news:da*************************@posting.google.co m...
Using A2K. I've got a form with 2 subforms (a subform within a
subform). When the user enters an amount on the main form, I place
that amount in subform1 with no problem but can't seem to get it
placed in subform2 correctly. It remains zero.

Below explains it better hopefully:

Amount: $25 <user enters amount and it gets placed in subform1
amount>
<Subform 1> Fund #: <blank until user enters> Amount: $25
<subform 2> Object code: <blank until user enters> Amount:
<want $25 placed here>

Here's my code to place the amount in subform1 and subform2:

<in AfterUpdate event of Amount field>
Me.subfrmBatchFunds!txtAmount = Me.txtCheckAmount
Me.subfrmBatchFunds.Form!subfrmBatchObjectCodes.Fo rm!txtAmount =
Me.txtCheckAmount

If I enter the fund # and object code first, then go back and enter
the amount, THEN the amount gets placed in subform2. But that's not
the
logical flow of data entry here.

Any help or advice is appreciated.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.