How do I link a form to an object from another table in Access

G

Guest

In my database I have a pair of tables, one for companies and one for
employees. The Company table has various stats for several companies, and it
has an OLE field for the company's logo. The Employees table has many
employees from each of the companies in the Company table, and an OLE field
with a picture of that particular employee. Each table has a form to be used
for data entry, and each table displays the picture for that particular
person or company, depending on which table the form receives its data from.
The Employee and Company tables have a many-to-one relationship between their
respective "CompanyName" fields (Many employees for each Company).

The problem I'm having is that in the Employee Form, I want to display both
the picture from the Employee's OLE field (called "EmployeePic") and the logo
from the Company as it appears in the Company's OLE field (called "Logo").
How can I change the control source of the Bound Object Frame in the
Employees' Form so that it will display the content of the Company table's
"Logo" OLE field?

If I try and make the table so that it includes the OLE "Logo" field from
the company table, then the form no longer will update or add records to the
Employee table (it returns syntax errors when I set up the navigation or
record addition buttons), but if I just put a Bound Object Frame into the
Employee form and use the Expression Builder to select the Logo field from
the Company table, nothing is displayed in the frame

Thanks in advance
 
N

Nick Coe \(UK\)

The usual way to directly embody a one to many relationship
on a form is with a Form/subform combination. You might
find displaying the employee picture on the subform a bit
tricky...

You could alternatively use a query based on the two tables
as the source for the form in question. You might then find
that you can't update the resulting recordset but it's worth
a try.
 

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