T
tspies85 via AccessMonster.com
Hi ,
i do have the same idea of creating a report. i've tried your way.. and this
error message came up
Run-time error '3075'
Invalid use of vertical bars in query expression ......
... this is my code...
Private Sub Command5_Click()
Dim strWhere As String
strWhere = "|=|"
If Not IsNull(Me.startDate) Then
strWhere = strWhere & "And [TarikhDaftar] >=# " & _
Me.startDate & "#"
End If
If Not IsNull(Me.endDate) Then
strWhere = strWhere & "And[TarikhDaftar] <=# " & _
Me.endDate & "#"
End If
DoCmd.OpenReport "Laporan Harta Semasa", acPreview, , strWhere
i do have the same idea of creating a report. i've tried your way.. and this
error message came up
Run-time error '3075'
Invalid use of vertical bars in query expression ......
... this is my code...
Private Sub Command5_Click()
Dim strWhere As String
strWhere = "|=|"
If Not IsNull(Me.startDate) Then
strWhere = strWhere & "And [TarikhDaftar] >=# " & _
Me.startDate & "#"
End If
If Not IsNull(Me.endDate) Then
strWhere = strWhere & "And[TarikhDaftar] <=# " & _
Me.endDate & "#"
End If
DoCmd.OpenReport "Laporan Harta Semasa", acPreview, , strWhere