Copy data from 1 subform to another subform

T

Theresa

I have a main form "Projects" which contains a tab control with 5 tabs, each
containing a different subform. Each subform is in datasheet view, tied to
the main form by the project id and have several records for each project. I
would like to pull certain fields from the first subform onto another
subform. I tried including these fields in my query, but the query becomes
non-updatable. If I create an unbound text box on my subform and reference
the original form, my dataset becomes non-updatable.

In short, I have a main Projects form containing basic information. I have
a subform which identifies "Areas" along with other information. I have
another subform, on another tab, where I would like the "Areas" to populate
automatically.

Can anyone tell me how to do this.
 
T

Tom van Stiphout

On Mon, 20 Jul 2009 15:25:01 -0700, Theresa

That sounds like bad database design, but that aside, you copy data
from one table to another using an Append query. You would probably
run it in subform1's Form_AfterUpdate. You may need to requery
subform2 after you do this.

-Tom.
Microsoft Access MVP
 
T

Theresa

Sorry.....it has been a few years and versions since I've done any designing.
I don't need to actually store the data more than once I just need to
reference it. My database is for electrical lighting retrofits. I have
"Projects" which identify location, installer, etc. (basic info). In order
to perform the retrofit, we have to know what lighting is currently in place.
I have this info in "Electrical_Costs_tbl" tied to the "Projects" thru the
Project ID. Everything for the existing lighting is working as it should in
the main form with the subform. My issue is in the new proposed lighting.
Some information that will be entered in the "Electrical_Costs_tbl" is
required to be carried over for other calculations in the "proposed lighting"
such as the location of the fixtures or "Area" (Main lobby, Mgrs Office,
etc), Rate KWH, Operating Hours, etc). When I list an "Area" in the
Electrical_Costs_subform, I would like that area and the related information
required to be automatically displayed in the proposed lighting subform.
Everytime I create a query to display the information, my dataset becomes
non-updatable. I have since created an interim table linking my "electrical
costs" to my "proposed lighting". I just can't seem to get my head around
how to create the subform to input the data.

Does this make sense? Can you shed any light?
 

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