Forms and data

G

Guest

I have created a form that will display a company depending on what type of
products they distribute. So for example, one form will display only
companies that distribute bikes and another form that displays companies that
distributes helmets. Now a company can distribute different products and
thus be on different forms. On these forms i have a subform which stores all
the products of said product type (i.e., all the different types of bikes).
I was wondering how to set it up so that when i insert data into the subform,
it will automatically be inserted with the correct corresponding product type
without having to change my tables. My table for the products has 3 fields:
supplier_ID, type_ID, product_ID. Thank you for any help you can provide.
 
G

G. Vaught

Why are you creating separate forms for this. You can create one form and
filter for whatever category you need to see by using a unbound drop-down
with the categories used, such as Bikes, Helmets etc.. Hopefully you are
storing all the data in the same table. If not, then you need to read up on
relationships and normalization of databases. The Microsoft Knowledge Base
has some articles on this subject as well as the Internet.
 
G

Guest

The reason for the separate forms is for business purposes. We do not want
everyone to be able to access all of the information. Certain departments
only need to see products related to their departments and thus should not be
able to view of all of the products.
 
J

John Vinson

The reason for the separate forms is for business purposes. We do not want
everyone to be able to access all of the information. Certain departments
only need to see products related to their departments and thus should not be
able to view of all of the products.

Having separate forms will not meet this need, and having one form
based on a Query selecting the departmentally-appropriate subset of
the data will not make it any more difficult.

John W. Vinson[MVP]
 
G

Guest

i asked how to perform a task a certain way, because that is the way i wanted
it done. i am not concerned with having an easier way to do this. i came to
this forum for help with a specific problem that i wanted answered. i do not
want an alternate method for executing what i originally wanted. i would
like to have separate forms for each product type, and i would like to
accomplish this without having to add extra input fields into my forms. i
would like for the inputted data to relate to the product type of the form
and be inserted into a table where the supplier_ID is supplied by the record,
the type_ID is supplied by the form, and the product_ID is supplied by the
input.
 
J

John Vinson

I have created a form that will display a company depending on what type of
products they distribute. So for example, one form will display only
companies that distribute bikes and another form that displays companies that
distributes helmets. Now a company can distribute different products and
thus be on different forms. On these forms i have a subform which stores all
the products of said product type (i.e., all the different types of bikes).
I was wondering how to set it up so that when i insert data into the subform,
it will automatically be inserted with the correct corresponding product type
without having to change my tables. My table for the products has 3 fields:
supplier_ID, type_ID, product_ID. Thank you for any help you can provide.

<shrug> Ok, I certainly can't insist that you do things my way, even
if I think it's a better way.

Put an unbound textbox (it can be invisible) on the mainform with the
appropriate Type_ID for that form. Make it one of the fields in the
Master Link Field property, and use the subform's TypeID in the child
link field.

John W. Vinson[MVP]
 
L

Larry Linson

i asked how to perform a task a certain way,
because that is the way i wanted it done. i
am not concerned with having an easier way . .

John Vinson is, to my personal knowledge an experienced and very capable
database application designer and implementer; you are fortunate that he is
also very patient. A lecture of the type to which I am posting this response
might well cause many people who answer questions here to think, "Well, if
JK wants to do things his own way, not the better way that would make things
easier, let him figure it out on his own" and, thus, not answer the question
you ask, nor any others for you.

But, as I said, John is very patient as well as extremely capable and he did
come back and try to help you "do it your way."

Larry Linson
Microsoft Access MVP
 
G

Guest

Thank you very much for your help.

John Vinson said:
<shrug> Ok, I certainly can't insist that you do things my way, even
if I think it's a better way.

Put an unbound textbox (it can be invisible) on the mainform with the
appropriate Type_ID for that form. Make it one of the fields in the
Master Link Field property, and use the subform's TypeID in the child
link field.

John W. Vinson[MVP]
 

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