Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop Up Menu for Reports

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
l2n77 (Visitor) Feb 27, 2002
I have a question with the reports within a db. i have a pop up menu in which a user can select a specific date to pull a report from. the combo box is reportdatebox and the field name is Report_Date. This is the current code i have. But it doesn't work. help!

stWhere = "[Report_Date]="
stRptName = "Daily Report"

If reportdatebox <> &quot;&quot; Then
DoCmd.OpenReport stRptName, acViewPreview, stWhere & reportdatebox
End If
 
Try enclosing the date with #

Dim stWhere as String
Dim stRptName as String

If IsDate(Me.ReportDateBox) = True then

stWhere = &quot;[Report_Date]=#&quot; & Me.ReportDateBox & &quot;#&quot;

stRptName = &quot;Daily Report&quot;

DoCmd.OpenReport stRptName, acViewPreview, stWhere

Else

MsgBox &quot;Please Select A Date&quot;, vbInformation

End If


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top