D
Dawn
We have an Access app that uses the following code. It works on some computers but not all. The error that
some are getting is "Runtime error 429 -- ActiveX Control could not create object" on the line of code beginning
with AcctRS.Open. I'm assuming that this means that something is not loaded on the computers that are getting
the error, but I don't know what (and our IT department is having difficulty figuring out what), so I was hoping
someone could help me.
Thanks!
Private Sub Distribute_All_Logs_Click()
Dim AcctRS As ADODB.Recordset
Dim Acct As Variant
Dim Address As Variant
DoCmd.OpenForm "account Numbers"
Set AcctRS = New ADODB.Recordset
AcctRS.CursorLocation = adUseClient
AcctRS.Open "SELECT AccountNumbers.AccountNumber, AccountNumbers.[Email Address]FROM AccountNumbers LEFT JOIN [Fax table] ON AccountNumbers.AccountNumber = [Fax table].Account WHERE ((([Fax table].Account) Is Null))", Application.CurrentProject.Connection, adOpenKeyset, adLockOptimistic
Set Forms("Account Numbers").Recordset = AcctRS
Do Until AcctRS.EOF
Address = [Forms]![Account Numbers]![Email Address]
DoCmd.SendObject acSendReport, "Email Purchasing Card Log", "snapshot format", Address, , , "Procurement Card Log ", "Attached is your Procurements Card Log(s). Please note the attached file is a read only file. This means you can open the file and print it, but you cannot make any changes to it. Expense Account Changes are due by the first deadline on the Procurement Card Log - DO NOT WAIT FOR RECEIPTS. We need these changes in order to reflect the correct numbers on your expense statements. Receipts and Signed Logs are due by the second deadline on the Procurement Card Log. If you are waiting on receipts, please notify Marilyn (x6876). REMINDERS: (1) Reply to this email if you DO NOT have account changes. (2) Send receipts via Interoffice Mail - Do Not Fax or Overnight. (3) Communicate to me if you will be Out Of Office", No
AcctRS.MoveNext
Loop
MsgBox "Finished emailing procurement card logs."
DoCmd.Close acForm, "Account Numbers"
End Sub
some are getting is "Runtime error 429 -- ActiveX Control could not create object" on the line of code beginning
with AcctRS.Open. I'm assuming that this means that something is not loaded on the computers that are getting
the error, but I don't know what (and our IT department is having difficulty figuring out what), so I was hoping
someone could help me.
Thanks!
Private Sub Distribute_All_Logs_Click()
Dim AcctRS As ADODB.Recordset
Dim Acct As Variant
Dim Address As Variant
DoCmd.OpenForm "account Numbers"
Set AcctRS = New ADODB.Recordset
AcctRS.CursorLocation = adUseClient
AcctRS.Open "SELECT AccountNumbers.AccountNumber, AccountNumbers.[Email Address]FROM AccountNumbers LEFT JOIN [Fax table] ON AccountNumbers.AccountNumber = [Fax table].Account WHERE ((([Fax table].Account) Is Null))", Application.CurrentProject.Connection, adOpenKeyset, adLockOptimistic
Set Forms("Account Numbers").Recordset = AcctRS
Do Until AcctRS.EOF
Address = [Forms]![Account Numbers]![Email Address]
DoCmd.SendObject acSendReport, "Email Purchasing Card Log", "snapshot format", Address, , , "Procurement Card Log ", "Attached is your Procurements Card Log(s). Please note the attached file is a read only file. This means you can open the file and print it, but you cannot make any changes to it. Expense Account Changes are due by the first deadline on the Procurement Card Log - DO NOT WAIT FOR RECEIPTS. We need these changes in order to reflect the correct numbers on your expense statements. Receipts and Signed Logs are due by the second deadline on the Procurement Card Log. If you are waiting on receipts, please notify Marilyn (x6876). REMINDERS: (1) Reply to this email if you DO NOT have account changes. (2) Send receipts via Interoffice Mail - Do Not Fax or Overnight. (3) Communicate to me if you will be Out Of Office", No
AcctRS.MoveNext
Loop
MsgBox "Finished emailing procurement card logs."
DoCmd.Close acForm, "Account Numbers"
End Sub