0
사용자에게 계정 번호와 날짜 범위를 입력하도록 요청하여 특정 기간에 계정에서 수행 된 작업을 확인해야하지만 실행할 때마다 "유형 불일치날짜별로 계정 작업 표시
Private Sub cmdSearch_Click()
Call search
End Sub
Sub search()
Dim strCriteria, strCount, task As String
Me.Refresh
If IsNull(Me.compte_hist) Or IsNull(Me.date_deb) Or IsNull(Me.date_fin) Then
MsgBox "s'il vous plaît assurez-vous que tous les champs sont remplis", vbInformation, "Date Range Required"
Me.compte_hist.SetFocus
Else
strCriteria = "([Date_operation]>= #" & Me.date_deb & "# And [Date_operation] <= #" & Me.date_fin & "#)"
strCount = "[Compte]=#" & Me.compte_hist & "#"
task = "select * from Operations where Operations (" & strCriteria & ")" And " (" & strCount & ") order by [Date_operation]"
DoCmd.ApplyFilter task
End If
End Sub
친절한 메모를,'strCriteria'와'strCount'은 변종이다. [doc] (http://stackoverflow.com/documentation/vba/877/declaring-variables/2957/dim#t=201607281239547850873)를 참조하십시오. – litelite