I am trying to set up a batch email command button but the debugger stalls on the first line of code below. It also doesn't like the "Set db = CurrentDb" line. I am using Access2000 and VB6.
Does anyone have any idea what's going on here?!
Dom from UK
____
Dim db As Database, rst As Recordset
Dim Names As String
Set db = CurrentDb
Set rst = db.OpenRecordset("MDCorpEnt", dbOpenDynaset)
With rst
.MoveFirst
Names = ! & ";"
.MoveNext
Do Until .EOF
Names = Names & ![email] & ";"
.MoveNext
Loop
End With
rst.Close
DoCmd.SendObject acSendReport, "jobopps", acFormatRTF, Names, , , "Current Job Opportunities for Classified Personnel", , True
Does anyone have any idea what's going on here?!
Dom from UK
____
Dim db As Database, rst As Recordset
Dim Names As String
Set db = CurrentDb
Set rst = db.OpenRecordset("MDCorpEnt", dbOpenDynaset)
With rst
.MoveFirst
Names = ! & ";"
.MoveNext
Do Until .EOF
Names = Names & ![email] & ";"
.MoveNext
Loop
End With
rst.Close
DoCmd.SendObject acSendReport, "jobopps", acFormatRTF, Names, , , "Current Job Opportunities for Classified Personnel", , True