Master / Child Multi Links

G

Guest

Hi
I have created a form which also has a subform.

The subform field linker was tried as I require the option of 2 fields to
decide the data to be shown in the subform.

eg
table 1 has EmployeeID
table 2 has ProductID

subform has the data from table 2

I want to be able to find the EmployeeID from
I want the option to search by emplyeeID or the ProductID depends what
information I have.

Is this possible and if so how.

Thanks
Noemi
 
J

John W. Vinson

Hi
I have created a form which also has a subform.

The subform field linker was tried as I require the option of 2 fields to
decide the data to be shown in the subform.

eg
table 1 has EmployeeID
table 2 has ProductID

subform has the data from table 2

I want to be able to find the EmployeeID from
I want the option to search by emplyeeID or the ProductID depends what
information I have.

Is this possible and if so how.

Thanks
Noemi

You'll either need two subforms, or you'll need to change the Master and Child
Link Field properties in code in some appropriate event.

I'm confused though - does Table2 have an EmployeeID to link to the main
form's EmployeeID? Or does the mainform have a ProductID? How are the tables
themselves related?

John W. Vinson [MVP]
 
G

Guest

Hi John
The employeeID is also in table2 however it can be multiple times due to the
different products and I only want the employeeID to be shown in the combo
box once so that is why I am also using table 1.

I hopt this makes sense to you.

I dont watn to do another subform because it will be showing exactly the
same details in both but the only other why I now that it can be done is have
multiple forms but I was hoping to avoid this.

Any ideas of how I might be able to fix this with the code, my Access coding
isn't as good as Excel.

thanks
Noemi
 
J

John W. Vinson

Hi John
The employeeID is also in table2 however it can be multiple times due to the
different products and I only want the employeeID to be shown in the combo
box once so that is why I am also using table 1.

I hopt this makes sense to you.

No, it doesn't. What tables do you have? Do you not have an Employee table
with one record per employee??

You do NOT need another table in order to create a combo box. You can base a
combo box on a Query; this query can use the "unique values" property to show
only one record per employee, even if the table has multiple.
I dont watn to do another subform because it will be showing exactly the
same details in both but the only other why I now that it can be done is have
multiple forms but I was hoping to avoid this.

Any ideas of how I might be able to fix this with the code, my Access coding
isn't as good as Excel.

I don't think any code is needed at all; if you have properly designed tables,
I think all you need is correct queries. But it's not yet clear to me how your
tables are structured or just what you're trying to accomplish with them!

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