G
Guest
I am using Access 2003 and am trying to figure out the RowSource for a field
in one of my tables. I am trying to limit the values that can be entered in
said field.
I have created a query with the following SQL:
SELECT P.pkSampleID, c.pkSampleID, c.SampleName
FROM tblSamples AS P INNER JOIN tblSamples AS c ON P.pkSampleID =
c.RepSampleID
WHERE (((c.pkSampleID)=6969) AND ((c.SampleName)="AW010") AND
((c.fkpkSiteID)=[P].[fkpkSiteID]) AND
((Int([c].[StartDate]))=Int([P].[StartDate])));
This query captures the exact data I want except, two of the criteria are
"hard coded" (c.pkSampleID=6969 and c.SampleName="AW010"). I would like to
use whatever the pkSampleID and SampleName are in the current record. Also,
once I figure out the correct syntax, should use a saved query or the
SQLstring as the RowSource. Can anyone offer a suggestion?
Thanks,
Wendy
in one of my tables. I am trying to limit the values that can be entered in
said field.
I have created a query with the following SQL:
SELECT P.pkSampleID, c.pkSampleID, c.SampleName
FROM tblSamples AS P INNER JOIN tblSamples AS c ON P.pkSampleID =
c.RepSampleID
WHERE (((c.pkSampleID)=6969) AND ((c.SampleName)="AW010") AND
((c.fkpkSiteID)=[P].[fkpkSiteID]) AND
((Int([c].[StartDate]))=Int([P].[StartDate])));
This query captures the exact data I want except, two of the criteria are
"hard coded" (c.pkSampleID=6969 and c.SampleName="AW010"). I would like to
use whatever the pkSampleID and SampleName are in the current record. Also,
once I figure out the correct syntax, should use a saved query or the
SQLstring as the RowSource. Can anyone offer a suggestion?
Thanks,
Wendy