2015-10-05 74 views
0

我正在通過文本框在表單中執行dcount。我只需要在表格中添加原因,並通過原因類型篩選並從開放表格中刪除。表單處於打開狀態,dcount會記錄所有類型字母的記錄,但不會被客戶端過濾。MS Access中的Dcount未正確過濾

有什麼建議嗎?

=DCount("reason","dbo_TimerTable","reason = letter" And "ClientID = Forms![Clients]![ClientID]") 

回答

3

該參數必須在字符串之外,且標準必須是一個表達式。

=DCount("reason","dbo_TimerTable","reason = letter And ClientID = " & Forms![Clients]![ClientID]) 

雖然我認爲有原因是一個文本字段,你需要:

=DCount("reason","dbo_TimerTable","reason = 'letter' And ClientID = " & Forms![Clients]![ClientID]) 

但你說因過濾已經工作...

+0

這工作,我認爲這是&我忘了..我會在幾分鐘內讓它成爲解決方案。謝謝你,乾杯! – DotyDot