L
Lewis M
I need to open a report based on two conditions. One condition is a user's
name, which is provided from a listbox on a form. The other condition is a
start date(sd) and end date(ed), which are provided from two calendar
controls on a form. I am trying to use the code below to open the report but
it doesn't work. Do you know how I can open a report using the conditions
stated?
sd = Form_Calendar.beg_date
ed = Form_Calendar.end_date
strLinkCriteria = "[BG_Responsible]=" & "'" & Me.List54.Value & "'"
strReportCriteria = "[HS_CHANGE_DATE] between #" & sd & "# and #" & ed & "#"
DoCmd.OpenReport stDocName, acViewPreview, strReportCriteria, strLinkCriteria
name, which is provided from a listbox on a form. The other condition is a
start date(sd) and end date(ed), which are provided from two calendar
controls on a form. I am trying to use the code below to open the report but
it doesn't work. Do you know how I can open a report using the conditions
stated?
sd = Form_Calendar.beg_date
ed = Form_Calendar.end_date
strLinkCriteria = "[BG_Responsible]=" & "'" & Me.List54.Value & "'"
strReportCriteria = "[HS_CHANGE_DATE] between #" & sd & "# and #" & ed & "#"
DoCmd.OpenReport stDocName, acViewPreview, strReportCriteria, strLinkCriteria