information from one form into multiple forms

J

jman

I have created a table/form for part details. I then want to create a way to
lookup a part in another form and have the details of that part (part name,
number, revision level, etc.) automatically fill in their fields on the new
form. I need to create multiple forms and reports with repeating part
details. Otherwise I would have just directly entered the part details into
the form.

There may also be parts with the same name, but different revision levels.
What would be the best way to set up the part details form so that it will
look up the correct part?
 
D

Duane Hookom

Forms don't contain/store data, they only display data/records. I question
why you think you need to "automatically fill in their fields". Normally,
your "part details" table has a primary key field. You store the value from
this field in your other, related tables. You should not store duplicate
values in multiple tables. This is simple normalization.

If you really, positively think you need to store multiple copies of the
same information, you can create a combo box on "another form". The combo
box has a row source of the fields from the "part details" table. You can
use code in the After Update event of the combo box to set the values of
other text boxes in the "another form". For instance

Me.txtPartName = Me.cboPartID.Column(1)

Columns are numbered beginning with 0.
 
J

jman

I think I understand what you're saying in regards to the forms not storing
data, but let me describe my issue a little better so you can understand and
maybe offer a suggestion.

I have a table with Part Details. It contains 5 fields: Part Name, Part
Number, Customer, Revision Level, # of Cavities. I have one form called
Sample Request which I generate one or two differentreports off of. The
second report is generated if an inspection on that sample is required. Both
reports refer to the same part, but contain different details of that same
part. I would not even use a part details table if this were all that were
required, but I need to use part details in other forms/reports. I suppose I
don't actually need to fill in the fields on the form with part details, but
I do need a way to select the part within the form and then have all or some
of the details of that specific part available in the form.

Basically I need a way to select a part from Part Details in any form then
have all or some of the details of that selected part available to be
inserted into a report.
 
D

Duane Hookom

You can create a report based on a query that has your Part Details table.
Join this table to your other table and add the fields from the Part Details
table so they can be added to the report.
 
J

jman

I very much appreciate your help on this issue, but could you please give me
a little bit more detail on how to do what you just suggested? I am an intern
basically teaching myself Access and do not understand what you have just
told me to do.
 
D

Duane Hookom

Please provide your table and field names and which fields/values you want
to display on your form/report.
 
J

jman

I have a table called "Part Details". It contains 5 fields: Part Name, Part
Number, Customer, Revision Level, # of Cavities. In the form "Tooling
Purchase Order Requisition" I want to set up a form (and then a report) to
enter relevant information plus select a part and bring in all the fields
related to it. In the form, "Status of First Piece Samples Schedule" I want
to set up a form (and then a report) to enter relevant information plus
select a different part and bring in the fields "Part Name", "Part Number",
and "Customer." for it.

I think if I can understand how to do that, I should be able to figure out
the rest.
 
D

Duane Hookom

Do have another table (or more) that you could share the name and fields?
There should be a field in the other table that stores a unique value from
"Part Details".

If you don't have this, then consider reading some materials on

table structures and normalization:
http://home.bendbroadband.com/conradsystems/accessjunkie/resources.html#DatabaseDesign101

database models:
http://home.bendbroadband.com/conradsystems/accessjunkie/resources.html#DatabaseModels

naming conventions
http://home.bendbroadband.com/conradsystems/accessjunkie/resources.html#NamingConventions
 

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