Sabtu, 10 September 2011

Re: [MS_AccessPros] How to Print Multiple Labels?

 

Marwa,

My sample db named Report_PrintLabelsCustomStart might be of interest to you. It is in access 2000 file format and is available at Rogers Access Library. Link:
http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=45

This sample db demonstrates two alternative methods for printing of labels in such a manner that starting position of first label as well as different number of copies for each label can be specified by the user. Out of available source data, only the labels selected by user will actually get printed.

For ready reference, brief description is placed below.

Best wishes,
A.D. Tejpal
------------

Report_PrintLabelsCustomStart (Sample Db)
Brief Description:
===============================
This sample db demonstrates printing of labels in such a manner that starting position of first label as well as different number of copies for each label can be specified by the user. Out of available source data, only the labels selected by user will actually get printed. The report used for this demo has three columns.

Two methods are covered as follows:
(a) Everything is managed via VBA code. No interference to report's record source is needed.
(b) The query serving as report's record source is devised in such a manner that it takes care of specified start position for first label to be printed as well as different number of copies for each label as desired. VBA code is minimal - just for hiding the control when label is blank.

Method (b) above makes use of driver table T_Ref having a single field RefNum populated with numbers 1 to 200. If the number of copies for any label are likely to exceed this number, contents of table T_Ref can be expanded suitably.

Source data consisting of three fields holding top middle and bottom lines for the intended label, is displayed in a subform along with a column displaying the desired number of copies in each case. The last column has bound check boxes enabling the user to select which of the labels are to be printed.

Sample label pertaining to current record in the subform is displayed on the parent form. Any editing of contents in the subform gets reflected promptly in the sample label.

Version: Access 2000 file format.
===============================

----- Original Message -----
From: Marwa Abo Amra
To: MS_Access_Professionals@yahoogroups.com
Sent: Saturday, September 10, 2011 17:11
Subject: Re: [MS_AccessPros] How to Print Multiple Labels?

Hi Gina,

You are so close to what I need. I did as you mentioned and it worked, but still there is one more code missing, I guess. Also, I created a continuous form to be able to enter the number of labels I want to print for each record I select. I first created the CountID field in my table, then I created the form so it becomes easy for the user to input how many labels to print per each record. Then I created the Labels report. I entered, for example, 5 for first record and 3 for the second one and left all other records (CountID field) empty. It printed correctly for the 2 records but printed also an infinite number of labels for the rest of records.

I thought if I put default value of CountId field to be zero then change the value as I need to print the labels I want. When I did that, I got a runtime error message and report did not show up. The runtime error '11': Division by zero and I clicked on Debug, the line If intLabelCount Mod [CountID] = 0 Then was shaded yellow. What do you think I can do here?

Excuse me for my many questions, I am still learning Access and I enjoy learning so much.

Thank you for the great help you provide.

Marwa

--- In MS_Access_Professionals@yahoogroups.com, "Gina Whipp" <classon@...> wrote:
>
> Marwa,
>
> Okay, I think I got something for you. You need a field in your table that will store the quantity of labels per record. For my example I called it CountID. Then set up your Label Report and put CountID on the report in the Detail section making in invisible. Then in the Detail On_Print section put...
>
> Static intLabelCount As Integer
>
> intLabelCount = intLabelCount + 1
>
> If intLabelCount Mod [CountID] = 0 Then
> Me.NextRecord = True
> intLabelCount = 0
> Else
> Me.NextRecord = False
> End If
>
>
> Thanks,
> Gina Whipp
> 2010 - 2011 Microsoft MVP (Access)
>
> www.access-diva.com
>
>
> From: Gina Whipp
> Sent: Friday, September 09, 2011 9:38 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: Re: [MS_AccessPros] How to Print Multiple Labels?
>
>
> Marwa,
>
> Oh I am sure there is a way but no one that I have ever done.
>
> Thanks,
> Gina Whipp
> 2010 - 2011 Microsoft MVP (Access)
>
> www.access-diva.com
>
> From: Marwa Abo Amra
> Sent: Friday, September 09, 2011 5:45 PM
> To: mailto:MS_Access_Professionals%40yahoogroups.com
> Subject: Re: [MS_AccessPros] How to Print Multiple Labels?
>
> Gina,
>
> Thank you so much. It is really good one. But in my project, I need to be able to choose some records and specify the number of labels I want to print then I can print all of them at once. For example, I need to select record number 3, 10, 52, 120, ... etc and specify number of labels for each record like 2, 3, 5, 2, 10,...etc. Then I preview all in one report and print them at once. Is there any way to do that?..
>
> I appreciate any help.
>
> Marwa
>
> --- In mailto:MS_Access_Professionals%40yahoogroups.com, "Gina Whipp" <classon@> wrote:
> >
> > oops... link didnâÂ?ÂTt come thru...
> >
> > http://www.access-diva.com/r1.html
> >
> > Thanks,
> > Gina Whipp
> > 2010 - 2011 Microsoft MVP (Access)
> >
> > www.access-diva.com
> >
> >
> > From: Marwa Abo Amra
> > Sent: Friday, September 09, 2011 2:24 PM
> > To: mailto:MS_Access_Professionals%40yahoogroups.com
> > Subject: [MS_AccessPros] How to Print Multiple Labels?
> >
> >
> > I need a code or a method to use to be able to print one or more labels; knowing that I need to print at least 1 copy of each record I choose all at once.
> >
> > I found a way to do so in this link: http://www.techrepublic.com/blog/msoffice/how-to-print-multiple-labels-for-a-single-record-in-access/872
> >
> > I used the steps shown under the title: Print one or more labels for one or more records
> >
> > When I followed the steps shown there, I got some compile errors and looks like the code was not really correct.
> >
> > May anyone help me in doing this? I would really appreciate any ideas.
> >
> > Thank you all!
> >
> > Marwa

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

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.


A Bad Credit Score is 600 or Below. Your Score? Find out at freecreditscore.com.
.

__,_._,___

Tidak ada komentar:

Posting Komentar