在 click() 上,我遇到以下问题或措辞:
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”
谢谢你的帮助。