I seem to have gotten over my head, but this seems fairly
straightforward..
I have a table of items assigned to a rep, and I have a rep list table
created from the original table ( to show only reps in the main
table).
I want to be able to send and email to each rep with only their
items.
I know I will have to have a loop statement that will take the reps
name and use that in a variable to be able to send it to each rep by
name. How do I sync that with the query?
I've got something like this:
Dim i As Integer
Dim strRep As String
For i = 1 To TblTempRep.Count
strRep = TblTempRep.Rep
DoCmd.SendObject acSendQuery, qryEmailRep, acFormatXLS, strRep
Next i
But I'm not sure if this is correct, or if this would be the proper
way.
I would think that using SQL would be easier than making a query and
passing the variable back to it through a function ( at least I think
that's how you would do it), but I don't have the knowledge to get the
SQL sent as a excel spreadsheet either.
I hope that makes sense, and thanks in advance for your time.