Automated Update Query For Mailing Campaigns

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a dialog box where a user can select certain criteria and then click
on a command button to call up a query that is filtered based on their
criteria selections in the dialog box. The resulting list can be exported to
Excel and mail merged for a mailing.

What I would like to automat, is for a user to click on a "Confirm" button
back in the dialog box, that has an on click event that executes an update to
the query. The update would check a check box indicating that a particular
type of mailing has been sent (lets say a confirmation mailing where a yes
value means it has been sent), and also updates a date of mailing field with
that day's date. So then the next time the user goes to send a confirmation
mailing they won't be duplicating any records previously mailed.

Can anyone provide an example of code for the on click event that would
execute the update?
 
Private Sub cmdConfirm_Click()
Docmd.OpenQuery "MyQueryThatPerformsTheUpdateQuery"
End Sub

The rest of the magic happens inside the query.
 
Back
Top