doran_doran
Registered User.
- Local time
- Today, 16:44
- Joined
- Aug 15, 2002
- Messages
- 349
Private Sub chkDM_Click()
Dim varDM As Variant
varDM = Me.txtDLDMemail
If Me.chkDM.Value = -1 Then
'original code not working
'DoCmd.RunSQL "INSERT INTO tbltmpRecipients ( TotalRecipients ) SELECT " & varDM & " AS txtRecipient;"
'New code not working either
DoCmd.RunSQL "INSERT INTO tbltmpRecipients (TotalRecipients) values (" & varDM & ");"
ElseIf Me.chkDM.Value = 0 Then
DoCmd.RunSQL "DELETE tbltmpRecipients.TotalRecipients FROM dummy WHERE (((tbltmpRecipients.totalRecipients)=" & varDM & "));"
End If
Me.tblTmpRecipientsSubform.Requery
End Sub
Dim varDM As Variant
varDM = Me.txtDLDMemail
If Me.chkDM.Value = -1 Then
'original code not working
'DoCmd.RunSQL "INSERT INTO tbltmpRecipients ( TotalRecipients ) SELECT " & varDM & " AS txtRecipient;"
'New code not working either
DoCmd.RunSQL "INSERT INTO tbltmpRecipients (TotalRecipients) values (" & varDM & ");"
ElseIf Me.chkDM.Value = 0 Then
DoCmd.RunSQL "DELETE tbltmpRecipients.TotalRecipients FROM dummy WHERE (((tbltmpRecipients.totalRecipients)=" & varDM & "));"
End If
Me.tblTmpRecipientsSubform.Requery
End Sub