ClearlyAnIdiot
Registered User.
- Local time
- Tomorrow, 01:49
- Joined
- Aug 22, 2013
- Messages
- 39
Right now, I have a a form that shows all of the information about a company, all based on 1 table. I also have a query where it shows all of the people related to a company, based on a tertiary table that shows each relationship. However, I need to enter the PK of the company every time I run the query. It goes like
Where Company-personID is the tertiary table and Individuals is the people table. Every time I use the query, it asks for the parameter value of "Companies.[CompanyNo]". I tried using the &s and me., but it said that there were missing operators. Was my syntax wrong, or is & Me.field & just impossible on SQL, and is there an alternative?
(P.S., the exact wording was WHERE & Me.Companies & = blah blah)
(P. P. S., pardon the pun at "pastport". I was sleepy)
Code:
SELECT [Company-personID].CompanyNo, [Company-personID].RolesPerformed, Individuals.Person, Individuals.Nationality, Individuals.HKIDorPassport, Individuals.Pastport, Individuals.Occupation, Individuals.Email, Individuals.[Contact Number], Individuals.Address, Individuals.PrevAdress, Individuals.PrevAddress2, [Company-personID].RolesPerformed.Value
FROM Individuals INNER JOIN [Company-personID] ON Individuals.[Person] = [Company-personID].[Person]
WHERE Companies.[CompanyNo] = [Company-personID].[CompanyNo];
(P.S., the exact wording was WHERE & Me.Companies & = blah blah)
(P. P. S., pardon the pun at "pastport". I was sleepy)