B
bermetj
I have a dynamic report generated based on selections on a form. User
selects values from combo boxes and then selects which report to run.
How would i write a "select distinct" query in VBA? Currently I have
the following code:
strSQL = "Distinct [Compound] " & strCompound & " AND [Indication] " &
strIndication & _
" AND [SiteStatus] " & strStatus & " AND [PI Lname] " &
strLName
strOrder = "[PI LName], [Compound], [Indication]"
With Reports![rpt Quick Reference]
.Filter = strSQL
.FilterOn = True
.OrderBy = strOrder
.OrderByOn = True
End With
Thank you!
selects values from combo boxes and then selects which report to run.
How would i write a "select distinct" query in VBA? Currently I have
the following code:
strSQL = "Distinct [Compound] " & strCompound & " AND [Indication] " &
strIndication & _
" AND [SiteStatus] " & strStatus & " AND [PI Lname] " &
strLName
strOrder = "[PI LName], [Compound], [Indication]"
With Reports![rpt Quick Reference]
.Filter = strSQL
.FilterOn = True
.OrderBy = strOrder
.OrderByOn = True
End With
Thank you!