Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / August 2007

Tip: Looking for answers? Try searching our database.

How to mark record as printed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Vincent - 31 Aug 2007 22:04 GMT
Hi,

I have a check-box field to determine whether or not to print a mailing
label for a person.  Once the label is printed, I would like Access to
automatically clear the check-box.  Is there a macro that I can create to do
this?  Or some other method besides the check-box clearing?

Thanks in advance,
Steve
UpRider - 31 Aug 2007 22:46 GMT
Steve, here's code I use to do just that.

Dim strSQL As String
strSQL = "UPDATE DISTINCTROW [qDBTCMAST ALPHA] SET [qDBTCMAST
ALPHA].NEEDS_NL = False " & _
   "WHERE ((([qDBTCMAST ALPHA].NEEDS_NL) = True));"
CurrentDb.Execute strSQL, dbFailOnError

You could put this code in a command button's click event, run it
automatically each time the database is started, or both.
These lines may break at odd lengths in your reader. The strSQL is 2 lines,
breaking at the end of the underline.

HTH, UpRider

> Hi,
>
[quoted text clipped - 6 lines]
> Thanks in advance,
> Steve
Larry Daugherty - 31 Aug 2007 23:01 GMT
One, simplistic, way is to use an Update Query.  Once printed, run the
query to reset the "ToPrint" bits from a line of code sometime after
the line of code that prints the report..  However, in my world, the
printer can have problems, things can go wrong on an individual report
or a series of them.  The real world requires some handy means of
handling those "exceptions".  I've interrupted those automatic
routines with a msgbox asking if all printed OK and its alright to
clear the bits.

HTH
Signature

-Larry-
--

> Hi,
>
[quoted text clipped - 5 lines]
> Thanks in advance,
> Steve
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.