I am trying to view a report that has records that are filtered by date. basically all of the records that are greater than whatever date is entered into an input box. I would actually like to know how to give a start and an end date, but i figured i might be able to master that once i get the first code down. Here is what i cam currently using. ncrdate is a field from my table.
Any help is greatly appreciated. I hope this question isnt too silly.
Code:
Dim stDocName As String
Dim mydate
Dim myval As String
myval = InputBox("Please enter the start date.")
mydate = DateValue(myval)
MsgBox (mydate) 'I was just using this to make sure that it was reported as an actual date
stDocName = "rptNCRSpread"
DoCmd.OpenReport stDocName, acPreview, , "ncrdate > myval"
Comment