0
Private Sub Cmd_Create_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim rs_conterparty As DAO.Recordset
Dim rsCount As Integer
Dim PE_nb As Integer
Dim BizNO As Field
Dim YearMonth As Field
Dim i, j, k, l, m, n As Integer
Set db = CurrentDb()
Set rs = db.OpenRecordset("TRD_ListofBiz")
Set BizNO = rs.Fields("BizNO")
Set YearMonth = rs.Fields("Year/Month of Delivery")
rs.MoveLast
rsCount = rs.RecordCount
Department = Me!Label_deal_status.Value
PE_nb = [Forms]![MAIN_PHYSICAL]![TRD_CONTERPARTY_PRI_VIEW]![TRD_Pricing-In]!Count
MsgBox (DCount("Year/Month of Delivery", "TRD_ListofBiz", "[Year/Month of Delivery]= '" & Me.Txt_entry & "'"))
我不明白为什么DCOUNT功能不起作用,虽然一个MsgBox以及检索“me.Txt_entry”
感谢您的帮助。
它能做什么,而不是工作? – phoog
出现消息框,提示“运行时错误3075”:查询表达式“计数(年/月交付)”中的语法错误(缺少运算符)。“ –
将其括在方括号内('[]') – phoog