473,327 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Using nested subform

Hi all,

I really need some helps.

I created a main form("category"), which contains a subform1, "Part".
Inside this subform also has contains a subform2, "Inventory".

The second level of subform, "Inventory" contains the field of quantity
in and out, and therefore I create a text box to do the calculation for
UnitOnHand. One textbox is also prepared in subform1, "Part", to get the
value shown in the UnitOnHand text box.

When I prepare the Form using "Part" (which means it becomes main form
and "Inventory" becomes subform), the calculated value can be shown
correctly on the "Part" form. However, when I create the Form using
"Category" (which means "Category" becomes main form, "Part" becomes
subform1, and "Inventory" becomes subform of the "Part" subform), the
calculated value cannot be shown, but "#Error" instead. If I click on
the + sign beside each item, the value will be shown.

How can I make it such that all the value can be shown automatically? I
try using Requery but no effect...

Help me pls....

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
4 5064
Just a few quick thought which I will not be able to follow up as I will be
without my computer for a week.

Normally Parts have categories (selected from a combo box) rather than
categories having parts.

If you really do want to have a main form of categories, try using 2
subforms, the first for parts linked to the categories, and the second for
the inventory linked to the PartID selected in the first subform. You will
nee to put some code in on the OnCurrent event of the part subform to
Requery the Inventory Subform.

I reiterate, it seems an odd way of doing things

HTH

Phil
"Spencer Lee" <sp*********@yahoo.com> wrote in message
news:N2***************@news.uswest.net...
Hi all,

I really need some helps.

I created a main form("category"), which contains a subform1, "Part".
Inside this subform also has contains a subform2, "Inventory".

The second level of subform, "Inventory" contains the field of quantity
in and out, and therefore I create a text box to do the calculation for
UnitOnHand. One textbox is also prepared in subform1, "Part", to get the
value shown in the UnitOnHand text box.

When I prepare the Form using "Part" (which means it becomes main form
and "Inventory" becomes subform), the calculated value can be shown
correctly on the "Part" form. However, when I create the Form using
"Category" (which means "Category" becomes main form, "Part" becomes
subform1, and "Inventory" becomes subform of the "Part" subform), the
calculated value cannot be shown, but "#Error" instead. If I click on
the + sign beside each item, the value will be shown.

How can I make it such that all the value can be shown automatically? I
try using Requery but no effect...

Help me pls....

*** Sent via Developersdex http://www.developersdex.com ***

Nov 13 '05 #2
Spencer Lee <sp*********@yahoo.com> wrote in
news:N2***************@news.uswest.net:
Hi all,

I really need some helps.

I created a main form("category"), which contains a subform1,
"Part". Inside this subform also has contains a subform2,
"Inventory".

The second level of subform, "Inventory" contains the field of
quantity in and out, and therefore I create a text box to do
the calculation for UnitOnHand. One textbox is also prepared
in subform1, "Part", to get the value shown in the UnitOnHand
text box.

When I prepare the Form using "Part" (which means it becomes
main form and "Inventory" becomes subform), the calculated
value can be shown correctly on the "Part" form. However, when
I create the Form using "Category" (which means "Category"
becomes main form, "Part" becomes subform1, and "Inventory"
becomes subform of the "Part" subform), the calculated value
cannot be shown, but "#Error" instead. If I click on the +
sign beside each item, the value will be shown.

How can I make it such that all the value can be shown
automatically? I try using Requery but no effect...

Help me pls....

*** Sent via Developersdex http://www.developersdex.com ***

When you put a form inside another form, it changes identity. It
is not forms!frmParts but Forms!frmCategory.subformParts.form

The textbox which receives your calculation must also be
addressed by this convoluted naming technique, or you will get
this #error.

There is a solution that is much easier, all subforms have a
..parent property. Recode your calculation to point to the
..parent instead of the explicit form name and it should work.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #3
To Phil,

Thanks for advice. I create in such way, as I want the form to be
presented in such subform format for the ease of updating record, and
also for the ease of printing record.
To Bob,

Thanks for your advice. Mind me to ask more in detail.

In my Inventory subform (2nd level), I create the text for calculation.
In the Part subform (1st level), the command I put is as follow:

=[Inventory subform].[Form]![UnitOnHand]

Think it should be changed right?
BTW, forget to mentioned that, the Part subform is in datasheet view in
the Category mainform.
*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #4
Anyone could help?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Wendy Powley | last post by:
I have a subform which represents a 1:N relationship with the main form. I would like to be able to read values from an external file, fill the subform with the values read & allow the user to...
0
by: DFS | last post by:
This works fine for me, and is very useful. You can't nest tab controls on each other, so: * start with main form * tab control 1 is placed on main form * subform 1 is placed on tab control 1...
2
by: pemigh | last post by:
I have an almost-ready-to-install database with one problem. Data is displayed chronologically, and when the user goes to the last record and searches up to get most recent results, he often...
4
by: Elaine | last post by:
Hi I have created a form which contains a subform. To cut a long story short, I have created a macro that moves the focus to the subform (GoToControl) and sets a value (SetValue) in the field...
20
by: Robert | last post by:
Need some help to stop me going around in circles on this one.... Have a nested subform (subform2) which simulates a continuous form for the record on the parent subform. Subform2 has rows of...
4
by: Regnab | last post by:
I've got a form - "frmLookup" (with a subform) that works very happily on its own. The form has a list box, which when updated requeries the subform to display the appropriate results. The...
8
AccessIdiot
by: AccessIdiot | last post by:
I'm having some trouble going from one form to another and carrying over the ID field (see this thread if you are interested). So I was thinking about ways around the problem. As far as my very...
9
by: angi35 | last post by:
Hi - In Access 2000, I have a form I want to filter, but I can't get the syntax right in the code. Form: Subform: Control on : txtStart Nested Subform on : Control on : txtSDate
2
by: angi35 | last post by:
I hope this is an easy question for someone out there. In Access 2000…I have a MainForm with a tab control (MAIN TABS) with 7 tabs. Within each tab is a SubForm. Within each SubForm is a tab...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.