On Fri, 16 Apr 2010 10:16:05 -0700, Kevbro7189 wrote:
> In my main Table I have a field called [Print]. It's a Yes/No check mark. I
> use this field to let me know if a record needs to be printed, it's
> automatically filled in as "-1" when the record is first generated. Through
> a Query (to find these records) I have a form that lists all the records that
> needs to be printed, so the user can double check them before printing.
>
> My problem is the user has to manually uncheck the [Print] field after they
> print the records. How can I go about and automate this process to uncheck
> the field when the print button is pressed?
Add a Command button to the form.
Code it's Click event:
CurrentDb.Execute "Update MyTable set MyTable.[Print] =
0;",dbFailOnError
Change MyTable to whatever the actual table name is.
**After** you are sure the report has successfully printed, click the
command button to reset all records.
NOTE: Print is a reserved Access/VBA/Jet word and should not be used
as a field name.
For a more complete list of reserved words, see:
http://www.allenbrowne.com/Ap****ueBadWord.html
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail