A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Automaticly clear checkmarks



 
 
Thread Tools Display Modes
  #1  
Old April 16th, 2010, 06:16 PM posted to microsoft.public.access.forms
Kevbro7189
external usenet poster
 
Posts: 35
Default Automaticly clear checkmarks

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?

  #2  
Old April 16th, 2010, 09:01 PM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default Automaticly clear checkmarks

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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.