Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在通过文本框以表格形式进行 dcount。我只需要它在通过打开表单中的原因类型和 clientid 过滤的表中添加原因。表单打开,dcount 计算所有类型为 letter 的记录,但不按客户端过滤。
有什么建议么?
=DCount("reason","dbo_TimerTable","reason = letter" And "ClientID = Forms![Clients]![ClientID]")
参数必须在字符串之外,并且标准必须是一个表达式。
=DCount("reason","dbo_TimerTable","reason = letter And ClientID = " & Forms![Clients]![ClientID])
尽管我认为有理由成为文本字段,但您需要:
=DCount("reason","dbo_TimerTable","reason = 'letter' And ClientID = " & Forms![Clients]![ClientID])
但是您说按原因过滤已经起作用了...