Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looping net send

Status
Not open for further replies.

hartwell

Technical User
Apr 18, 2005
80
GB
I want to send a net send to multiple people from a query, so it would take each record from a field untill the end, I have never done a loop before and have no idea where to start

they query would be called FilterAgent and the field would be called RACF under access97
 
Have a look at recordset (either DAO or ADODB).

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
i dont supose u could show an example
 
What have you tried so far ?
TONS of threads in the access fora about browsing a recordset.
 
ive been looking at posts for the past hour but just going over my head
 
well i tried the following but with e-mails instead of net send (im at home at the moment) but doesnt work, error user-definded type not definded

Dim rs As DAO.Recordset
Dim qd As DAO.QueryDef
set qd = CurrentDb.QueryDefs("qryemail")
set rs = qd.OpenRecordset
Do Until rs.EOF
DoCmd.SendObject , , , rs!Address, , "TEST", "TESTING"
rs.MoveNext
Loop
 
When in VBE menu Tools -> References ...
select the Microsoft DAO 3.x library.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
thats great works fine, does that mean it needs to be enabled on every machine access runs in!?
 
This reference is part of your database, so if the target machine has the library with same or higher version then simply copying the database should suffice.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top