Eightball3
Programmer
I've converted a Access 97 database over to Access 2000. This code used to work. Can anyone find the reason it doesn't?
Dim Message As String
Dim Subject As String
Dim num As Single
Dim records As Single
Dim x As Single
Message = "This is a test message."
Subject = "Test Date " + Str(Date)
num = DCount("*", "poc_table"
DoCmd.OpenForm "poc_form", acNormal, , , acFormEdit, acIcon
For x = 1 To num
DoCmd.GoToRecord acDataForm, "poc_form", acGoTo, x
records = DCount("*", "recall_e_mail"
If Forms![poc_form]![E_Mail_Recall] = "Y" Then
If records > 0 Then
If IsNull(Forms![poc_form]![E_Mail_Address]) Then
DoCmd.OpenReport "Recall_E_Mail", A_NORMAL 'Print Recall on Paper
Else
DoCmd.SendObject acSendReport, "Recall_E_Mail", acFormatRTF, Forms![poc_form]![E_Mail_Address], , , Subject, Message, False
End If
End If
Else
If records > 0 Then DoCmd.OpenReport "Recall_E_Mail", A_NORMAL
End If
Next x
DoCmd.Close acForm, "poc_form"
This used to work in Access 97 but now it emails out the first message but nothing else. After the first one it just gives me an hour glass like its doing something...but no emails.
Anyone have any ideas?
Dim Message As String
Dim Subject As String
Dim num As Single
Dim records As Single
Dim x As Single
Message = "This is a test message."
Subject = "Test Date " + Str(Date)
num = DCount("*", "poc_table"
DoCmd.OpenForm "poc_form", acNormal, , , acFormEdit, acIcon
For x = 1 To num
DoCmd.GoToRecord acDataForm, "poc_form", acGoTo, x
records = DCount("*", "recall_e_mail"
If Forms![poc_form]![E_Mail_Recall] = "Y" Then
If records > 0 Then
If IsNull(Forms![poc_form]![E_Mail_Address]) Then
DoCmd.OpenReport "Recall_E_Mail", A_NORMAL 'Print Recall on Paper
Else
DoCmd.SendObject acSendReport, "Recall_E_Mail", acFormatRTF, Forms![poc_form]![E_Mail_Address], , , Subject, Message, False
End If
End If
Else
If records > 0 Then DoCmd.OpenReport "Recall_E_Mail", A_NORMAL
End If
Next x
DoCmd.Close acForm, "poc_form"
This used to work in Access 97 but now it emails out the first message but nothing else. After the first one it just gives me an hour glass like its doing something...but no emails.
Anyone have any ideas?