G
Guest
I am trying to open a Access report based on the date input by the user in an
input box. Trying to work with SQL and docmd.openreport statements. Below is
the code and any help would be appreciated.
Public Function ReportFieldOrder()
Dim rptMember As Report, strAsk As String, strSQL As String
strAsk = InputBox("Enter Date", "Date", Date)
DateValue strAsk
strSQL = "Select * from Table1 where [Toda] = " & strAsk
Set rptMember = Application.Reports("rptDateEnrolled")
DoCmd.OpenReport "rptDateEnrolled", acViewNormal, , strSQL
End Function
input box. Trying to work with SQL and docmd.openreport statements. Below is
the code and any help would be appreciated.
Public Function ReportFieldOrder()
Dim rptMember As Report, strAsk As String, strSQL As String
strAsk = InputBox("Enter Date", "Date", Date)
DateValue strAsk
strSQL = "Select * from Table1 where [Toda] = " & strAsk
Set rptMember = Application.Reports("rptDateEnrolled")
DoCmd.OpenReport "rptDateEnrolled", acViewNormal, , strSQL
End Function