|
大家好,我想了解一下,我在mdb中写的代买,为什么在adp中就提示出错?
adp与mdb窗体中的代买填写有区别么?
代码如下:
Private Sub ok_Click()
On Error GoTo Err_ok_Click
Dim STRWHERE As String
STRWHERE = ""
If Not IsNull(Me.KSRQ) Then
STRWHERE = STRWHERE & "([日期]>=#" & Format(Me.KSRQ, "YYYY-MM-DD") & "#) AND"
End If
If Not IsNull(Me.JSRQ) Then
STRWHERE = STRWHERE & "([日期]>=#" & Format(Me.JSRQ, "YYYY-MM-DD") & "#) AND"
End If
If Len(STRWHERE) > 0 Then
STRWHERE = Left(STRWHERE, Len(STRWHERE) - 5)
End If
Me.MYD_ZCT.Form.Filter = STRWHERE
Me.MYD_ZCT.Form.FilterOn = True
Me.MYD_ZCT.Requery
EXTI_ok_CLICK:
Exit Sub
ERR_ok_CLICK:
MsgBox Err.Description
Resume EXIT_ok_CLICK
End Sub |
|