View Single Post
  #3  
Old December 22nd, 2005, 07:47 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Display same information on a text box from multiple tables

Thanks John!
That is agreat idea. Thank you so much for your help.

John Welch wrote:
Macace- how about this idea:
I'm assuming that a manual can have only one owner at a time.
You could add two fields to your Manuals table: CompanyOwnerID and
EmployeeOwnerID and populate only one of these fields depending on who owns
the manual. You could set the table properties to not allow data in both
fields:
To do this, set the table level validation rule to: isnull([CompanyOwnerID])
or isnull([EmployeeOwnerID])
(Or maybe at some point you might want to know both the employee and
company??)
Then you could build a query that joined the Manuals table to both the
Company and Employee tables on these two new fields. The joins will have to
be LEFT joins (include all records from Manuals table and only those from
other table where fields match)
Include whatever fields (Address, Zip, etc) from these tables that you want
to show for the owner.
Then in your form, to get the correct info into your textboxes, you could
set their control sources like this: (for the zip, for example)
= iif(isnull([CompanyOwnerID]),[tblEmployees].[Zip],[tblCompanies].[Zip])

Hope this helps
-John

Hello everyone!
I hope somebody can help me with the following problem that I have. I have

[quoted text clipped - 22 lines]

Thanks