我正在尝试使用 DCount() 函数从我的表中返回一个计数。我的问题是它总是返回一个 NULL 值。
我应该如何重新编写此 VBA 语句以使其返回准确的计数?
ReturnedCount = DCount("CountOfItems", "[__TestTable]", "NameOfItem = " & ItemName)
Debug.Print ReturnedCount
我正在尝试使用 DCount() 函数从我的表中返回一个计数。我的问题是它总是返回一个 NULL 值。
我应该如何重新编写此 VBA 语句以使其返回准确的计数?
ReturnedCount = DCount("CountOfItems", "[__TestTable]", "NameOfItem = " & ItemName)
Debug.Print ReturnedCount