G
grep
Long post - sorry, but I'm trying to give you guys the info you need.
I'm trying to write a query that will give me all the information I need
to fill fields in a Word merge document.
TBLCLIENTS TBLCLIENTCONTACTS TBLCONTRACTINFO
ClientID ContactID ContractInfoID
CompanyName ClientID ClientID
Address FirstName PrimaryContact
City LastName TechnicalContact
State BillingContact
Zip OtherContact1
OtherContact2
OtherContact3
Date
TblClientContacts is related to TblClients via ClientID.
The problem seems to be with relating TblContractInfo and
TblClientContacts. All the Contact fields in TblContractInfo are Number
fields, containing the ContactID for the appropriate contacts from
TblClientContacts. In other words, PrimaryContact may equal 26,
TechnicalContact - 27, etc. On my form, this is okay because I look up
the name fields so it shows up right. But what shows up in the query is
just the numbers, which won't do for the merge.
So I tried making a query with multiple instances of TblClientContacts
(named Primary, Technical, Billing, etc...) and linking the ContactID
fields to the appropriate fields in TblContractInfo. This works, as long
as there are values in all the Contact fields. But there may not always
be an OtherContact3, for example. And when there isn't, the entire
record shows up blank. So how do I get the query to show a record even
when not all the linked fields have values?
grep
I'm trying to write a query that will give me all the information I need
to fill fields in a Word merge document.
TBLCLIENTS TBLCLIENTCONTACTS TBLCONTRACTINFO
ClientID ContactID ContractInfoID
CompanyName ClientID ClientID
Address FirstName PrimaryContact
City LastName TechnicalContact
State BillingContact
Zip OtherContact1
OtherContact2
OtherContact3
Date
TblClientContacts is related to TblClients via ClientID.
The problem seems to be with relating TblContractInfo and
TblClientContacts. All the Contact fields in TblContractInfo are Number
fields, containing the ContactID for the appropriate contacts from
TblClientContacts. In other words, PrimaryContact may equal 26,
TechnicalContact - 27, etc. On my form, this is okay because I look up
the name fields so it shows up right. But what shows up in the query is
just the numbers, which won't do for the merge.
So I tried making a query with multiple instances of TblClientContacts
(named Primary, Technical, Billing, etc...) and linking the ContactID
fields to the appropriate fields in TblContractInfo. This works, as long
as there are values in all the Contact fields. But there may not always
be an OtherContact3, for example. And when there isn't, the entire
record shows up blank. So how do I get the query to show a record even
when not all the linked fields have values?
grep