johndoomed
VBA idiot
- Local time
- Yesterday, 23:34
- Joined
- Nov 4, 2004
- Messages
- 174
Hi,
I have problems with a date filter. I've tried searching, but could not find the answer.
My code:
The two lines are highlighted.
I want the form to show the posts with has [Action dato] equal or larger then todays date.
I have problems with a date filter. I've tried searching, but could not find the answer.
My code:
Private Sub filter_Click()
On Error GoTo Err_filter_Click
Statid = Me.Status_ID
MyDate = Date
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Faktura_oversikt"
stLinkCriteria = "[Status ID]=" & Statid
DoCmd.OpenForm stDocName, , , stLinkCriteria
MsgBox (MyDate)
Forms!Faktura_oversikt.filter = "[Action dato] =< MyDate"
Exit_filter_Click:
Exit Sub
Err_filter_Click:
MsgBox Err.Description
Resume Exit_filter_Click
End Sub
The two lines are highlighted.
I want the form to show the posts with has [Action dato] equal or larger then todays date.