Selasa, 20 September 2011

RE: [MS_AccessPros] Re: How to know if a report has printed

As I have stated several times, there might be a method using the code from FredG modified to update a field in your report's record source. This field value would then determine which records could appear in the label report.

Duane Hookom
MS Access MVP

To: MS_Access_Professionals@yahoogroups.com
From: runuphillracing@yahoo.com
Date: Tue, 20 Sep 2011 16:07:28 +0000
Subject: [MS_AccessPros] Re: How to know if a report has printed


Duane, Jim & George,

Let me explain the process as it is now. They first have to create the bar codes. They select the item number, pack size, and number of labels. Then they run a process that generates the bar code numbers, populates the table with the numbers, item and pack info, and opens up a report with the labels. Once they close the report, they do not have the ability to open it up again with those bar code numbers. It only opens from the process that generates the numbers (so, I'm not worried about the report appearing again). However, while the report is open in preview mode, apparently there is nothing to prevent them from printing it as many times as they want. Thus, it sounds like there's not much I can do about this with code.

Thanks
Adam

--- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@...> wrote:
>
>
> I don't mess with menues. If you had a field that could be set to True if printed, there are a number of ways prevent this record from appearing in the print or print preview.
>
> Duane Hookom
> MS Access MVP
>
>
>
>
> To: MS_Access_Professionals@yahoogroups.com
> From: runuphillracing@...
> Date: Mon, 19 Sep 2011 22:33:13 +0000
> Subject: [MS_AccessPros] Re: How to know if a report has printed
>
>
>
>
>
>
> Duane,
>
> I didn't try to code. I don't have a field, but could easily add one. I was hoping that was something I could do when they actually printed it. Lacking that, I didn't see the point of adding the field or trying the code.
>
> Lacking that, would it be possible to disable the Print option from the pull-down menus, create my own custom print icon (I know I can hide the standard print icon) that would initiate code to check to see if the batch has been printed, print the report and mark the batch as being printed if not, and send a message if it has been marked? I know how to refer to a Macro from a custom icon. I don't know how to point it to VB code though.
>
> Adam
>
> --- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@> wrote:
> >
> >
> > Adam,
> > Do you have any field in your table that identifies if a record has been printed?
> > Did you at least try the code to see if the MsgBox matches your expectation of printing vs previewing?
> >
> > Duane Hookom
> > MS Access MVP
> >
> >
> >
> >
> > To: MS_Access_Professionals@yahoogroups.com
> > From: runuphillracing@
> > Date: Mon, 19 Sep 2011 20:42:38 +0000
> > Subject: [MS_AccessPros] Re: How to know if a report has printed
> >
> >
> >
> >
> >
> >
> > Duane,
> >
> > Where would I put this code? There is no "OnPrint" for reports.
> >
> > The way it's done now, the report is brought up in Preview mode so they can review the labels before printing (that's how they want it now). Then they print from there (using Ctrl-P or the printer icon). There's nothing in the system that would prevent them from printing repeated times from the Preview mode until they close the report. Once closed, they can't bring up those labels again.
> >
> > Adam
> >
> > --- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@> wrote:
> > >
> > >
> > > I generally recommend prompting the user with a msgbox following the printing like:
> > >
> > > If msgBox("Did these labels successfully print?",vbYesNo+vbQuestion,"Labels Printed") = vbYes then
> > > currentdb.Execute "UPDATE ... ", dbFailOnError
> > > End If
> > >
> > > FredG posted something a number of years ago that might work. You would need to replace the MsgBox with some type of update query.
> > >
> > > Option Compare Database
> > > Option Explicit
> > > Dim intPreview As Integer
> > >
> > > Private Sub Report_Activate()
> > > intPreview = -1 ' If [Pages] is not used
> > > ' intPreview = -2 ' If [Pages] used
> > > End Sub
> > >
> > > Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
> > > If intPreview >= 0 Then ' If [Pages] not used
> > > ' If intPreview >= 1 Then ' If [Pages] used
> > > MsgBox "Gone Printing"
> > > End If
> > > intPreview = intPreview + 1
> > > End Sub
> > >
> > > Duane Hookom
> > >
> > >
> > >
> > >
> > > To: MS_Access_Professionals@yahoogroups.com
> > > From: runuphillracing@
> > > Date: Mon, 19 Sep 2011 19:49:50 +0000
> > > Subject: [MS_AccessPros] Re: How to know if a report has printed
> > >
> > >
> > >
> > >
> > >
> > >
> > > No.
> > >
> > > Adam
> > >
> > > --- In MS_Access_Professionals@yahoogroups.com, "luvmymelody" <luvmymelody@> wrote:
> > > >
> > > >
> > > > Adam
> > > >
> > > > Did you ever find the solution to your question?
> > > >
> > > > Jim Wagner
> > > >
> > > >
> > > > --- In MS_Access_Professionals@yahoogroups.com, "AdamF" <runuphillracing@> wrote:
> > > > >
> > > > > Is there a way to mark a report when it prints (at least when sent to a printer rather than just preview) so that it doesn't get reprinted?
> > > > >
> > > > > Printing bar code labels. Each label has a unique number, so I don't want them to print it twice. I know I can mark it in the code I use to print the labels if it were printed directly from that code. However, they want it to display in preview mode, then to print from there.
> > > > >
> > > > > Adam
> > > > > Denver, CO
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>


[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Tidak ada komentar:

Posting Komentar