G
Guest
I am trying to utilize a combo box to allow the user to select an indivudual
from a list which will filter the query and provide a mailing list for just
that sale reps accounts. I would then like that list email in .xls format.
Here is my code:
Dim strQueryName
Dim strText
Dim strSQL
Dim strWhere
strQueryName = "XmasCardList"
strText = "Attached please find your 2005 Holiday Card List." & vbCrLf &
vbCrLf & "Thank you."
strWhere = "[LO] = """ & Forms![Distribution]!cboXmasListSort & """"
'DoCmd.SendObject acQuery, strQueryName, "MicrosoftExcelBiff8(*.xls)", _
'DLookup("[LOEmail]", "XmasCardList", strWhere), _
'"", , "Holiday Card List", _
'strText, False, ""
I can get it to work as a report but I wanted to provide the excel list so
the recipient can utilize mailmerge for labels.
Any help??
from a list which will filter the query and provide a mailing list for just
that sale reps accounts. I would then like that list email in .xls format.
Here is my code:
Dim strQueryName
Dim strText
Dim strSQL
Dim strWhere
strQueryName = "XmasCardList"
strText = "Attached please find your 2005 Holiday Card List." & vbCrLf &
vbCrLf & "Thank you."
strWhere = "[LO] = """ & Forms![Distribution]!cboXmasListSort & """"
'DoCmd.SendObject acQuery, strQueryName, "MicrosoftExcelBiff8(*.xls)", _
'DLookup("[LOEmail]", "XmasCardList", strWhere), _
'"", , "Holiday Card List", _
'strText, False, ""
I can get it to work as a report but I wanted to provide the excel list so
the recipient can utilize mailmerge for labels.
Any help??