ibgreat
09-02-2008, 07:55 PM
Hello All,
I have two list boxes lstClientAgencies and lstSupports. The second's WHERE statement used info from the the first's. It references the third column from lstAgency. I am not sure why SQL in the ROWSOURCE is not working.
Here it is:
SELECT tblClientSupportPeople_D.ClientSupportPersonID,
tblClientSupportPeople_D.PersonID_Client,
tblClientSupportPeople_D.AgencyID, tblClientSupportPeople_D.[PersonID-Agency],
tblPerson_D.LastName, tblPerson_D.FirstName,
tblClientSupportPeople_D.Active
FROM tblPerson_D
INNER JOIN tblClientSupportPeople_D
ON tblPerson_D.PersonID = tblClientSupportPeople_D.[PersonID-Agency]
WHERE (((tblClientSupportPeople_D.PersonID_Client)=
[Forms]![frmPerson].[txtPersonID]) AND
((tblClientSupportPeople_D.AgencyID)=Forms!frmPers on.lstClientAgencies.Column(2)) AND
((tblClientSupportPeople_D.Active)=True));
You can see the reference:
Forms!frmPerson.lstClientAgencies.Column(2)
I posted this on another forum and have already worked through a number of possible issue. I haven't had any luck though. If you want to view the other post it is at:
http://forums.aspfree.com/microsoft-access-help-18/reference-the-unbound-column-242256.html
I have two list boxes lstClientAgencies and lstSupports. The second's WHERE statement used info from the the first's. It references the third column from lstAgency. I am not sure why SQL in the ROWSOURCE is not working.
Here it is:
SELECT tblClientSupportPeople_D.ClientSupportPersonID,
tblClientSupportPeople_D.PersonID_Client,
tblClientSupportPeople_D.AgencyID, tblClientSupportPeople_D.[PersonID-Agency],
tblPerson_D.LastName, tblPerson_D.FirstName,
tblClientSupportPeople_D.Active
FROM tblPerson_D
INNER JOIN tblClientSupportPeople_D
ON tblPerson_D.PersonID = tblClientSupportPeople_D.[PersonID-Agency]
WHERE (((tblClientSupportPeople_D.PersonID_Client)=
[Forms]![frmPerson].[txtPersonID]) AND
((tblClientSupportPeople_D.AgencyID)=Forms!frmPers on.lstClientAgencies.Column(2)) AND
((tblClientSupportPeople_D.Active)=True));
You can see the reference:
Forms!frmPerson.lstClientAgencies.Column(2)
I posted this on another forum and have already worked through a number of possible issue. I haven't had any luck though. If you want to view the other post it is at:
http://forums.aspfree.com/microsoft-access-help-18/reference-the-unbound-column-242256.html