Email Listbox

J

Jack

I have a listbox with 20 items in it from a query. I would like the user to
highlight the items that they would like to query and then select a command
button to run the report on only the highlighted items. Finally, I would like
to view, then email the results (report)to the email address which I typed
into a textbox. Has anyone ever done something like this? Does anyone know
how to write the code for this? Any help is greatly appreciated. Thanks in
advance!

Jack
 
J

Jack

Allen, this is what I am trying to incorporate:

Dim strDoc As String
Dim strDate As String
Const conDateFormat = "\#mm\/dd\/yyyy\#"
strDoc = "rptEmployeeData"
strField = "dateactive"
If IsNull(Me.txtStartDate) Then
If Not IsNull(Me.txtEndDate) Then
strDate = strField & " <= " & Format(Me.txtEndDate, conDateFormat)
End If
Else
If IsNull(Me.txtEndDate) Then
strDate = strField & " >= " & Format(Me.txtStartDate,
conDateFormat)
Else
strDate = strField & " Between " & Format(Me.txtStartDate,
conDateFormat) _
& " And " & Format(Me.txtEndDate, conDateFormat)
End If
End If
Any suggestions?
 
A

Allen Browne

Okay, I can't write the code for you, but the idea is to create the 2
strings - one for the date, and the other for the multi-select list box -
and then join them together with AND .

Then OpenReport in acViewPreview.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top