在sql访问中对select子句使用多个标准

时间:2015-09-22 13:35:15

标签: ms-access

我必须从访问表单中选择标准,然后在SELECT Access中的sql子句中使用。我想在报告的查询中使用结果。显示我想要选择的标准的表单图片,这是我的query

SELECT MatchesT.Position, MatchesT.Date, MatchesT.Amount,       
       MatchesT.Reference, MatchesT.Branch, 
       MatchesT.MatchDate, MatchesT.Employee
FROM MatchesT
WHERE MatchesT.Position=Forms!Matches_Check!cbposition 
   AND MatchesT.Date Between Forms!Matches_Check!txtdate1 
   AND Forms!Matches_Check!txtdate2 
   AND  MatchesT.Amount=Forms!Matches_Check!txtamount 
   AND MatchesT.Reference=Forms!Matches_Check!txtreference 
   AND MatchesT.Branch=Forms!Matches_Check!txtbranch 
   AND MatchesT.MatchDate Between Forms!Matches_Check!txtmatchdate1 
   AND Forms!Matches_Check!txtmatchdate2  
   AND MatchesT.Employee=Forms!Matches_Check!txtteammember;

enter image description here

0 个答案:

没有答案