I have an operation which opens an access report for a specific date:
What I need to do is convert it so that it finds all results where a search string appears in the comment field. But also, I want the report to say something like 'Search Results for "searchstring"' or something like that.
Is this possible?
Thanks
Chris
Code:
With objaccess
.AutomationSecurity = msoAutomationSecurityLow
.Visible = False
.OpenCurrentDatabase "\\bdifps01\Groups\Platform.Supervisor\DO NOT USE - Log (Front).accdb"
.DoCmd.OpenReport "rptSupervisorsLogHistoric", acViewPreview, , "([DateReported]=#" & Format(dtpReportDate.Value, "mm/dd/yy") & "# And [TimeReported]>=TimeSerial(4,0,0) ) Or ([DateReported]=#" & Format(dtpReportDate.Value + 1, "mm/dd/yy") & "# And [TimeReported]<TimeSerial(4,0,0) )", acHidden
.DoCmd.OutputTo acOutputReport, "rptSupervisorsLogHistoric", acFormatPDF, Folder & "\BDI Supervisors Log for " & Format(dtpReportDate.Value, "d mmm yy") & ", Created at " & Format(Time, "hhmm") & " on " & Format(Date, "d mmm yy") & ".pdf", , False
.DoCmd.Close acReport, "rptQuote"
.CloseCurrentDatabase
End With
What I need to do is convert it so that it finds all results where a search string appears in the comment field. But also, I want the report to say something like 'Search Results for "searchstring"' or something like that.
Is this possible?
Thanks
Chris