Dim db As DAO.Database, rstzmb As DAO.Recordset, rsthle As DAO.Recordset
Dim rstzmbcx As DAO.Recordset
Dim hlevalue As Currency, strkh As String
Set db = CurrentDb
Set rstzmb = db.OpenRecordset("帐目表", dbOpenDynaset)
MsgBox rstzmb("登帐年月")
rstzmb.FindFirst "[登帐年月]=#" & txtyearmonth.Value & "#"
MsgBox rstzmb("登帐年月")
If rstzmb.NoMatch Then
Else
MsgBox "帐目表中已有登帐数据,请先用取消取消登帐删除数据"
Exit Sub
End If
Dim yhzk As DAO.Recordset
Set yhzk = db.OpenRecordset("应收帐款表", dbOpenDynaset)
rstzmb.FindFirst "[登帐年月]=#" & txtyearmonth.Value & "#"
If rstzmb.NoMatch Then
Else
MsgBox "应收帐款表中已有登帐数据,请先用取消登帐删除数据"
Exit Sub
End If
MsgBox "2"