First a little background...
My account table/form has two pertinent fields: AcctName & AcctPhone.
For residential accounts, the AcctName is the household name and AcctPhone is the house or primary phone number. For commercial accounts, the AcctName is the name of the company and AcctPhone is the number for the main office.
On this form, there is also a subform to list "Contacts". This table includes ContactName, ContactPhone, ContactTitle. For residential accounts this would include alternate phone numbers such as mobile phones, work phones, etc. For commercial accounts it would include people within the company and there phone numbers.
The tricky part is on my "Phonebook" form. I want this form to list all of the AcctName listings with corresponding phone numbers AND all of the ContactName listings. I am hoping to have them all seamlessly listed together.
Example
AcctName: My Company
AcctPhone: (000) 555-1234
---ContactName: Bob Robertson
---ContactPhone: (000) 555-4321
---ContactTitle: Account Manager
---ContactName: Rob Bobertson
---ContactPhone: (000) 555-9876
---ContactTitle: Facilities Manager
Then on my Phonebook form you would see the following
Bobertson, Rob_____(000) 555-9876_____Facilities Manager
My Company_______(000) 555-1234_____
Robertson, Bob_____(000) 555-4321_____ Account Manager
Everything should be listed together in alphabetical order. There does not need to be any reference from contacts to company. Users will be able to double-click a name, either company or contact and open the corresponding account page.
What I have for the rowsource right now is:
(Client = AcctName; Phone1 = AcctPhone)
SELECT tblClient.ClientID, tblClients.Client, tblClients.Phone1 FROM tblClients WHERE (((tblClients.Client) Like forms!frmContactList!txtLastNameFilter & "*")) ORDER BY tblClients.Client;
This successfully displays the AcctName from the main table/form, but I don't know how to go about merging the two into one list.