Default use Specific Printer and Label Size
Default use Specific Printer and Label Size
am 12.10.2007 00:21:05 von NTL News Group
I am trying to get MS Access 2000 to print names and addresses onto a
Dymo 400 label printer, I have set the Access Report to automatically
select the correct printer, then select the label size of 99012 Large
Address.
This works fine but when I move my database to another PC (with
identical Dymo printer and drivers) the report defaults to the correct
printer but does not select the label 99012 Large Address. On
different PCs it selects different label sizes. I am distributing an
MDE (split front back end), when we enter the page set up and manually
select the correct label size, then close and open the report again it
has changed back to the wrong label size. I cant find a way to make it
stay on the correct size.
Any help would be appreciated.
If this is off subject the I apologise, I am not sure if this is an
Access or print driver problem.
Re: Default use Specific Printer and Label Size
am 12.10.2007 00:40:12 von Arc
What is the "99012 Large Address"? Is this a report name, or label type?
By the way, how did you create the report? Using the label wizard, or custom
sized? I have customers that want support for the dymo label printer, and I
would love to have a copy of that report, if possible.
Andy
"Ian" wrote in message
news:llxPi.4571$WX3.901@newsfe5-win.ntli.net...
>I am trying to get MS Access 2000 to print names and addresses onto a Dymo
>400 label printer, I have set the Access Report to automatically select the
>correct printer, then select the label size of 99012 Large Address.
>
> This works fine but when I move my database to another PC (with identical
> Dymo printer and drivers) the report defaults to the correct printer but
> does not select the label 99012 Large Address. On different PCs it
> selects different label sizes. I am distributing an MDE (split front back
> end), when we enter the page set up and manually select the correct label
> size, then close and open the report again it has changed back to the
> wrong label size. I cant find a way to make it stay on the correct size.
>
> Any help would be appreciated.
>
> If this is off subject the I apologise, I am not sure if this is an Access
> or print driver problem.
Re: Default use Specific Printer and Label Size
am 12.10.2007 00:56:32 von NTL News Group
When the Printer of Dymo 400 is selected there are a number of Paper
Sizes that can be selected from the drop down list, one of the paper
sizes is 99012 Large Address, so it refers to the size of the paper.
I created the report manually, just set it to the printer, paper size,
set it to Landscape and put the relevant margins in, fits like a glove
until it forgets the paper size which it does every time I close it. You
are most welcome to a copy of the report if I can ever get it to work.
ARC wrote:
> What is the "99012 Large Address"? Is this a report name, or label type?
>
> By the way, how did you create the report? Using the label wizard, or
> custom sized? I have customers that want support for the dymo label
> printer, and I would love to have a copy of that report, if possible.
>
> Andy
> "Ian" wrote in message
> news:llxPi.4571$WX3.901@newsfe5-win.ntli.net...
>> I am trying to get MS Access 2000 to print names and addresses onto a
>> Dymo 400 label printer, I have set the Access Report to automatically
>> select the correct printer, then select the label size of 99012 Large
>> Address.
>>
>> This works fine but when I move my database to another PC (with
>> identical Dymo printer and drivers) the report defaults to the correct
>> printer but does not select the label 99012 Large Address. On
>> different PCs it selects different label sizes. I am distributing an
>> MDE (split front back end), when we enter the page set up and manually
>> select the correct label size, then close and open the report again it
>> has changed back to the wrong label size. I cant find a way to make it
>> stay on the correct size.
>>
>> Any help would be appreciated.
>>
>> If this is off subject the I apologise, I am not sure if this is an
>> Access or print driver problem.
>
Re: Default use Specific Printer and Label Size
am 12.10.2007 03:19:08 von Tony Toews
Ian wrote:
>I am trying to get MS Access 2000 to print names and addresses onto a
>Dymo 400 label printer, I have set the Access Report to automatically
>select the correct printer, then select the label size of 99012 Large
>Address.
>
>This works fine but when I move my database to another PC (with
>identical Dymo printer and drivers) the report defaults to the correct
>printer but does not select the label 99012 Large Address. On
>different PCs it selects different label sizes. I am distributing an
>MDE (split front back end), when we enter the page set up and manually
>select the correct label size, then close and open the report again it
>has changed back to the wrong label size. I cant find a way to make it
>stay on the correct size.
You might need to create the appropriate paper size on the printer. Just guessing
but it only takes a few minutes to setup.
Setting up custom paper sizes is totally different in the Win NT 4/2000/Win XP
environment compared to Win 95/98/ME.
Go into the list of Printers under the Settings button from the Start menu. You may
need to do this on the print server. Then click on File >> Server Properties Then
you can create a new form with the sizes you want on it as well as a name.
Then you can follow the below steps inside Access to choose the just created Paper
Size. Go into the design of the report, Click 'File',Page Setup', Click the 'Page'
tab., Select 'Specific Printer',, Pick the printer you are using., Click 'Properties'
then the 'Paper' tab., In 'Paper Size' select 'Custom'. and choose your just created
Paper Size.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Re: Default use Specific Printer and Label Size
am 12.10.2007 10:55:50 von Keith Tizzard
I answered this about an hour or so ago but my reply is not appearing
so I must have failed to hit the Send button! So here goes again:
Open you report in Design mode.
Select Page Setup
On the Page tab, alongside Use Specific Printer, press the Printer
button
Select your printer and then press the Properties button
On the Layout tab, press the Advanced button
Against Paper/Output Paper size select your label 99012 Large Address
OK your way out of the windows
It is this value that appears to be remembered.
You will need to do this on every PC where the problem occurs. But
you will only need to do it once.
Good luck
Jim
Re: Default use Specific Printer and Label Size
am 12.10.2007 10:58:30 von Keith Tizzard
Ian
I have had this problem.
Open you report in Design mode. Select Page Setup. On the Page tab,
alongside Use Specific Printer, press the Printer button. Having
selected your printer, press Properties. On the Layout tabe, press
the Advanced button near the bottom right. Against Paper/Ouput, Paper
size, select you 99012 Large Address label. OK your way out of the
various popup windows.
You will need to do this on every PC where there is a problem. You
should need to do this only once on each PC.
Good luck
Jim
Re: Default use Specific Printer and Label Size
am 12.10.2007 19:56:13 von NTL News Group
I have done the following as suggested:
Open you report in Design mode. Select Page Setup. On the Page tab,
alongside Use Specific Printer, press the Printer button. Having
selected your printer, press Properties. On the Layout tabe, press
the Advanced button near the bottom right. Against Paper/Ouput, Paper
size, select you 99012 Large Address label.
Using Access 2000 with an MDB this works fine and Remembers the page
size and settings next time I open the report, however when I convert
this database to an MDE it Forgets the changes as soon as I close the
report so each time I open it I have to make the setting changes again.
For the usual reasons I dont want to distribute an MDE.
I have not yet tried Tonys suggestion about setting up a custom
paper sizes but I will.
Ian wrote:
> I am trying to get MS Access 2000 to print names and addresses onto a
> Dymo 400 label printer, I have set the Access Report to automatically
> select the correct printer, then select the label size of 99012 Large
> Address.
>
> This works fine but when I move my database to another PC (with
> identical Dymo printer and drivers) the report defaults to the correct
> printer but does not select the label 99012 Large Address. On
> different PCs it selects different label sizes. I am distributing an
> MDE (split front back end), when we enter the page set up and manually
> select the correct label size, then close and open the report again it
> has changed back to the wrong label size. I cant find a way to make it
> stay on the correct size.
>
> Any help would be appreciated.
>
> If this is off subject the I apologise, I am not sure if this is an
> Access or print driver problem.
Re: Default use Specific Printer and Label Size
am 15.10.2007 15:00:21 von Hank Reed
On Oct 12, 1:56 pm, Ian wrote:
> I have done the following as suggested:
> Open you report in Design mode. Select Page Setup. On the Page tab,
> alongside Use Specific Printer, press the Printer button. Having
> selected your printer, press Properties. On the Layout tabe, press
> the Advanced button near the bottom right. Against Paper/Ouput, Paper
> size, select you 99012 Large Address label.
>
> Using Access 2000 with an MDB this works fine and Remembers the page
> size and settings next time I open the report, however when I convert
> this database to an MDE it Forgets the changes as soon as I close the
> report so each time I open it I have to make the setting changes again.
>
> For the usual reasons I don't want to distribute an MDE.
>
> I have not yet tried Tony's suggestion about setting up a custom
> paper sizes but I will.
>
> Ian wrote:
> > I am trying to get MS Access 2000 to print names and addresses onto a
> > Dymo 400 label printer, I have set the Access Report to automatically
> > select the correct printer, then select the label size of "99012 Large
> > Address".
>
> > This works fine but when I move my database to another PC (with
> > identical Dymo printer and drivers) the report defaults to the correct
> > printer but does not select the label "99012 Large Address". On
> > different PC's it selects different label sizes. I am distributing an
> > MDE (split front back end), when we enter the page set up and manually
> > select the correct label size, then close and open the report again it
> > has changed back to the wrong label size. I cant find a way to make it
> > stay on the correct size.
>
> > Any help would be appreciated.
>
> > If this is off subject the I apologise, I am not sure if this is an
> > Access or print driver problem.
II may have experienced a similar problem. What I found is that the
selection of label or paper sizes from the driver set up, seems to be
ordinal not by label size. So if your design PC has the driver set up
for
1. 2" X 2" Labels
2. 4" X 4" Labels
3. 6" X 6" Labels
But the user's PC is set up like this:
1. 6" X 6" Labels
2. 4" X 4" Labels
3. 1" X 2" Labels
If the report design was to use 2 X 2 labels its works on your PC
picking set up number 1.
On the user's PC, it picks set number 1 also, but it's 6 X 6
So I recommend that your revisit the driver set ups on each PC and
make sure the sizes are in the same order as your design PC
If that isn't clear, ask me again.
Good luck,
Hank Reed
Re: Default use Specific Printer and Label Size
am 15.10.2007 15:17:03 von NTL News Group
Hank
I have tried that, Access does Not remeber these settings from an MDE.
Hank wrote:
> On Oct 12, 1:56 pm, Ian wrote:
>> I have done the following as suggested:
>> Open you report in Design mode. Select Page Setup. On the Page tab,
>> alongside Use Specific Printer, press the Printer button. Having
>> selected your printer, press Properties. On the Layout tabe, press
>> the Advanced button near the bottom right. Against Paper/Ouput, Paper
>> size, select you 99012 Large Address label.
>>
>> Using Access 2000 with an MDB this works fine and Remembers the page
>> size and settings next time I open the report, however when I convert
>> this database to an MDE it Forgets the changes as soon as I close the
>> report so each time I open it I have to make the setting changes again.
>>
>> For the usual reasons I don't want to distribute an MDE.
>>
>> I have not yet tried Tony's suggestion about setting up a custom
>> paper sizes but I will.
>>
>> Ian wrote:
>>> I am trying to get MS Access 2000 to print names and addresses onto a
>>> Dymo 400 label printer, I have set the Access Report to automatically
>>> select the correct printer, then select the label size of "99012 Large
>>> Address".
>>> This works fine but when I move my database to another PC (with
>>> identical Dymo printer and drivers) the report defaults to the correct
>>> printer but does not select the label "99012 Large Address". On
>>> different PC's it selects different label sizes. I am distributing an
>>> MDE (split front back end), when we enter the page set up and manually
>>> select the correct label size, then close and open the report again it
>>> has changed back to the wrong label size. I cant find a way to make it
>>> stay on the correct size.
>>> Any help would be appreciated.
>>> If this is off subject the I apologise, I am not sure if this is an
>>> Access or print driver problem.
>
> II may have experienced a similar problem. What I found is that the
> selection of label or paper sizes from the driver set up, seems to be
> ordinal not by label size. So if your design PC has the driver set up
> for
> 1. 2" X 2" Labels
> 2. 4" X 4" Labels
> 3. 6" X 6" Labels
> But the user's PC is set up like this:
> 1. 6" X 6" Labels
> 2. 4" X 4" Labels
> 3. 1" X 2" Labels
> If the report design was to use 2 X 2 labels its works on your PC
> picking set up number 1.
> On the user's PC, it picks set number 1 also, but it's 6 X 6
>
> So I recommend that your revisit the driver set ups on each PC and
> make sure the sizes are in the same order as your design PC
> If that isn't clear, ask me again.
> Good luck,
> Hank Reed
>
Re: Default use Specific Printer and Label Size
am 17.10.2007 13:10:39 von m3ckon
Ian,
We've been having the identical problem for the past year and have been
unable to find a solution.
The problem started when we upgraded Access on all of the workstations.
We only put the full versions on the computers where design work was
being done since the company doesn't have that many licenses. We may try
loading full versions on the computers that are used for printing labels
to see if that helps. We have a feeling, though, that whenever we update
the .mdb, we might still need to open and save the label report in
design mode on each computer.
If we make any progress I will post it here. Please do the same if you
find anything.
Doug
*** Sent via Developersdex http://www.developersdex.com ***
Re: Default use Specific Printer and Label Size
am 01.11.2007 21:11:58 von raf_technologies
On Oct 17, 5:10 am, Doug wrote:
> Ian,
> We've been having the identical problem for the past year and have been
> unable to find a solution.
>
> The problem started when we upgraded Access on all of the workstations.
> We only put the full versions on the computers where design work was
> being done since the company doesn't have that many licenses. We may try
> loading full versions on the computers that are used for printing labels
> to see if that helps. We have a feeling, though, that whenever we update
> the .mdb, we might still need to open and save the label report in
> design mode on each computer.
>
> If we make any progress I will post it here. Please do the same if you
> find anything.
>
> Doug
>
> *** Sent via Developersdexhttp://www.developersdex.com***
Hello All,
Take a look at these articles...they should help you out.
The first will show how to change page settings and the second shows
you all the setting values
http://support.microsoft.com/?kbid=302416
http://msdn.microsoft.com/archive/default.asp?url=/archive/e n-us/dnaraccessdev/html/ODC_MicrosoftOfficeDeveloperForumCon trollingYourPrinterinMicrosoftAccess.asp
Happy Printing,
Rob F
Re: Default use Specific Printer and Label Size
am 02.11.2007 12:30:38 von raf_technologies
On Nov 1, 2:11 pm, raf_technolog...@yahoo.com wrote:
> On Oct 17, 5:10 am, Doug wrote:
>
>
>
>
>
> > Ian,
> > We've been having the identical problem for the past year and have been
> > unable to find a solution.
>
> > The problem started when we upgraded Access on all of the workstations.
> > We only put the full versions on the computers where design work was
> > being done since the company doesn't have that many licenses. We may try
> > loading full versions on the computers that are used for printing labels
> > to see if that helps. We have a feeling, though, that whenever we update
> > the .mdb, we might still need to open and save the label report in
> > design mode on each computer.
>
> > If we make any progress I will post it here. Please do the same if you
> > find anything.
>
> > Doug
>
> > *** Sent via Developersdexhttp://www.developersdex.com***
>
> Hello All,
> Take a look at these articles...they should help you out.
> The first will show how to change page settings and the second shows
> you all the setting values
>
> http://support.microsoft.com/?kbid=302416
>
> http://msdn.microsoft.com/archive/default.asp?url=/archive/e n-us/dnar...
>
> Happy Printing,
> Rob F- Hide quoted text -
>
> - Show quoted text -
Sorry guys, I missed the MDE part of that.
Here's a function I wrote that uses the Application.Printer object.
This seems to work great with the MDE I distribute to the desktop....
Best Regards, Rob F
Public Function PrintTags(ByVal vlngNumber, ByVal vintChangeFlag,
Optional ByRef rvarErrorMsg As Variant)
'This function prints a tag a specified number of times
Dim lngNumber As Long
Dim prt As Printer
Dim strDefault As String
Dim blnFound As Boolean
On Error GoTo ErrTrap
If vlngNumber = 0 Then Exit Function
strDefault = Application.Printer.DeviceName
blnFound = False
'print to the label printer
For Each prt In Printers
If InStr(1, prt.DeviceName, "label") Then
Application.Printer = prt
Application.Printer.PaperSize = acPRPSUser
If LabelType = "Big" Then
Application.Printer.ItemSizeHeight = 2150
Application.Printer.ItemSizeWidth = 4000
Else
Application.Printer.ItemSizeHeight = 1130
Application.Printer.ItemSizeWidth = 3500
End If
Application.Printer.BottomMargin = 0
Application.Printer.TopMargin = 0
Application.Printer.LeftMargin = 0
Application.Printer.RightMargin = 0
Application.Printer.Orientation = acPRORLandscape
blnFound = True
GoTo FoundPrinter
End If
Next prt
FoundPrinter:
If blnFound Then
If IsNull(vintChangeFlag) Then vintChangeFlag = 0
If vintChangeFlag < 2 Then
lngNumber = Nz(vlngNumber, 0)
Do While lngNumber > 0
If LabelType = "Big" Then
If GetLocation = "SHPS" Then
DoCmd.OpenReport
"rptLabelSeikoIndividualBig_SHPS"
Else
DoCmd.OpenReport "rptLabelSeikoIndividualBig"
End If
Else
DoCmd.OpenReport "rptLabelSeikoIndividual"
End If
lngNumber = lngNumber - 1
Loop
End If
Application.Printer = Nothing
Else
MsgBox "Label Printer Not Found", vbCritical + vbOKOnly,
"Can't Print"
End If
GoTo ExitFunction
ErrTrap:
gvarErrNum = Err.Number
gvarErrDesc = Err.Description
rvarErrorMsg = BuildError("PrintTags", "mdlGlobalFunctions",
CNames(conintUser), gvarErrNum, gvarErrDesc, rvarErrorMsg)
ExitFunction:
End Function
Re: Default use Specific Printer and Label Size
am 02.11.2007 17:51:02 von Arc
Where are you placing the function you wrote?
I found a strange thing with trying to set the paper size using the
application.printer object. Using the code I'll paste below, as long as you
Preview the report, it will set the paper size. However, if you just go
straight to printing (using the docmd.openreport.... acNormal), the code
below doesn't work, even though I have the code in the On_open of the
report, so it is firing. Any ideas on that? If using acNormal causes any
application.printer commands to be ignored, then I need to somehow find a
different solution, as many of my customers like to print, rather than
preview first. Thanks!
Dim rpt As Access.Report
Set rpt = Reports(Forms!frmOpt.Form!RunName.Caption)
'Set the default printer's orientation to landscape
'rpt.Printer.Orientation = acPRORLandscape
'Set the default printer's paper size to legal
If TempVars!PaperSize <> 1 Then
rpt.Printer.PaperSize = TempVars!PaperSize
End If
wrote in message
news:1193950736.548032.296910@e34g2000pro.googlegroups.com.. .
> On Nov 1, 2:11 pm, raf_technolog...@yahoo.com wrote:
>> On Oct 17, 5:10 am, Doug wrote:
>>
>>
>>
>>
>>
>> > Ian,
>> > We've been having the identical problem for the past year and have been
>> > unable to find a solution.
>>
>> > The problem started when we upgraded Access on all of the workstations.
>> > We only put the full versions on the computers where design work was
>> > being done since the company doesn't have that many licenses. We may
>> > try
>> > loading full versions on the computers that are used for printing
>> > labels
>> > to see if that helps. We have a feeling, though, that whenever we
>> > update
>> > the .mdb, we might still need to open and save the label report in
>> > design mode on each computer.
>>
>> > If we make any progress I will post it here. Please do the same if you
>> > find anything.
>>
>> > Doug
>>
>> > *** Sent via Developersdexhttp://www.developersdex.com***
>>
>> Hello All,
>> Take a look at these articles...they should help you out.
>> The first will show how to change page settings and the second shows
>> you all the setting values
>>
>> http://support.microsoft.com/?kbid=302416
>>
>> http://msdn.microsoft.com/archive/default.asp?url=/archive/e n-us/dnar...
>>
>> Happy Printing,
>> Rob F- Hide quoted text -
>>
>> - Show quoted text -
>
> Sorry guys, I missed the MDE part of that.
>
> Here's a function I wrote that uses the Application.Printer object.
> This seems to work great with the MDE I distribute to the desktop....
> Best Regards, Rob F
>
> Public Function PrintTags(ByVal vlngNumber, ByVal vintChangeFlag,
> Optional ByRef rvarErrorMsg As Variant)
> 'This function prints a tag a specified number of times
> Dim lngNumber As Long
> Dim prt As Printer
> Dim strDefault As String
> Dim blnFound As Boolean
> On Error GoTo ErrTrap
> If vlngNumber = 0 Then Exit Function
> strDefault = Application.Printer.DeviceName
> blnFound = False
>
> 'print to the label printer
> For Each prt In Printers
> If InStr(1, prt.DeviceName, "label") Then
> Application.Printer = prt
> Application.Printer.PaperSize = acPRPSUser
> If LabelType = "Big" Then
> Application.Printer.ItemSizeHeight = 2150
> Application.Printer.ItemSizeWidth = 4000
> Else
> Application.Printer.ItemSizeHeight = 1130
> Application.Printer.ItemSizeWidth = 3500
> End If
> Application.Printer.BottomMargin = 0
> Application.Printer.TopMargin = 0
> Application.Printer.LeftMargin = 0
> Application.Printer.RightMargin = 0
> Application.Printer.Orientation = acPRORLandscape
> blnFound = True
> GoTo FoundPrinter
> End If
> Next prt
>
>
> FoundPrinter:
> If blnFound Then
> If IsNull(vintChangeFlag) Then vintChangeFlag = 0
> If vintChangeFlag < 2 Then
> lngNumber = Nz(vlngNumber, 0)
> Do While lngNumber > 0
> If LabelType = "Big" Then
> If GetLocation = "SHPS" Then
> DoCmd.OpenReport
> "rptLabelSeikoIndividualBig_SHPS"
> Else
> DoCmd.OpenReport "rptLabelSeikoIndividualBig"
> End If
> Else
> DoCmd.OpenReport "rptLabelSeikoIndividual"
> End If
> lngNumber = lngNumber - 1
> Loop
> End If
> Application.Printer = Nothing
> Else
> MsgBox "Label Printer Not Found", vbCritical + vbOKOnly,
> "Can't Print"
> End If
> GoTo ExitFunction
>
> ErrTrap:
> gvarErrNum = Err.Number
> gvarErrDesc = Err.Description
> rvarErrorMsg = BuildError("PrintTags", "mdlGlobalFunctions",
> CNames(conintUser), gvarErrNum, gvarErrDesc, rvarErrorMsg)
>
> ExitFunction:
> End Function
>
Re: Default use Specific Printer and Label Size
am 02.11.2007 19:07:27 von Stuart McCall
"ARC" wrote in message
news:UzIWi.3963$Nz7.2323@nlpi070.nbdc.sbc.com...
> Where are you placing the function you wrote?
>
> I found a strange thing with trying to set the paper size using the
> application.printer object. Using the code I'll paste below, as long as
> you Preview the report, it will set the paper size. However, if you just
> go straight to printing (using the docmd.openreport.... acNormal), the
> code below doesn't work, even though I have the code in the On_open of the
> report, so it is firing. Any ideas on that? If using acNormal causes any
> application.printer commands to be ignored, then I need to somehow find a
> different solution, as many of my customers like to print, rather than
> preview first. Thanks!
>
>
> Dim rpt As Access.Report
> Set rpt = Reports(Forms!frmOpt.Form!RunName.Caption)
> 'Set the default printer's orientation to landscape
> 'rpt.Printer.Orientation = acPRORLandscape
> 'Set the default printer's paper size to legal
> If TempVars!PaperSize <> 1 Then
> rpt.Printer.PaperSize = TempVars!PaperSize
> End If
>
>
>
> wrote in message
> news:1193950736.548032.296910@e34g2000pro.googlegroups.com.. .
>> On Nov 1, 2:11 pm, raf_technolog...@yahoo.com wrote:
>>> On Oct 17, 5:10 am, Doug wrote:
>>>
>>>
>>>
>>>
>>>
>>> > Ian,
>>> > We've been having the identical problem for the past year and have
>>> > been
>>> > unable to find a solution.
>>>
>>> > The problem started when we upgraded Access on all of the
>>> > workstations.
>>> > We only put the full versions on the computers where design work was
>>> > being done since the company doesn't have that many licenses. We may
>>> > try
>>> > loading full versions on the computers that are used for printing
>>> > labels
>>> > to see if that helps. We have a feeling, though, that whenever we
>>> > update
>>> > the .mdb, we might still need to open and save the label report in
>>> > design mode on each computer.
>>>
>>> > If we make any progress I will post it here. Please do the same if you
>>> > find anything.
>>>
>>> > Doug
>>>
>>> > *** Sent via Developersdexhttp://www.developersdex.com***
>>>
>>> Hello All,
>>> Take a look at these articles...they should help you out.
>>> The first will show how to change page settings and the second shows
>>> you all the setting values
>>>
>>> http://support.microsoft.com/?kbid=302416
>>>
>>> http://msdn.microsoft.com/archive/default.asp?url=/archive/e n-us/dnar...
>>>
>>> Happy Printing,
>>> Rob F- Hide quoted text -
>>>
>>> - Show quoted text -
>>
>> Sorry guys, I missed the MDE part of that.
>>
>> Here's a function I wrote that uses the Application.Printer object.
>> This seems to work great with the MDE I distribute to the desktop....
>> Best Regards, Rob F
>>
>> Public Function PrintTags(ByVal vlngNumber, ByVal vintChangeFlag,
>> Optional ByRef rvarErrorMsg As Variant)
>> 'This function prints a tag a specified number of times
>> Dim lngNumber As Long
>> Dim prt As Printer
>> Dim strDefault As String
>> Dim blnFound As Boolean
>> On Error GoTo ErrTrap
>> If vlngNumber = 0 Then Exit Function
>> strDefault = Application.Printer.DeviceName
>> blnFound = False
>>
>> 'print to the label printer
>> For Each prt In Printers
>> If InStr(1, prt.DeviceName, "label") Then
>> Application.Printer = prt
>> Application.Printer.PaperSize = acPRPSUser
>> If LabelType = "Big" Then
>> Application.Printer.ItemSizeHeight = 2150
>> Application.Printer.ItemSizeWidth = 4000
>> Else
>> Application.Printer.ItemSizeHeight = 1130
>> Application.Printer.ItemSizeWidth = 3500
>> End If
>> Application.Printer.BottomMargin = 0
>> Application.Printer.TopMargin = 0
>> Application.Printer.LeftMargin = 0
>> Application.Printer.RightMargin = 0
>> Application.Printer.Orientation = acPRORLandscape
>> blnFound = True
>> GoTo FoundPrinter
>> End If
>> Next prt
>>
>>
>> FoundPrinter:
>> If blnFound Then
>> If IsNull(vintChangeFlag) Then vintChangeFlag = 0
>> If vintChangeFlag < 2 Then
>> lngNumber = Nz(vlngNumber, 0)
>> Do While lngNumber > 0
>> If LabelType = "Big" Then
>> If GetLocation = "SHPS" Then
>> DoCmd.OpenReport
>> "rptLabelSeikoIndividualBig_SHPS"
>> Else
>> DoCmd.OpenReport "rptLabelSeikoIndividualBig"
>> End If
>> Else
>> DoCmd.OpenReport "rptLabelSeikoIndividual"
>> End If
>> lngNumber = lngNumber - 1
>> Loop
>> End If
>> Application.Printer = Nothing
>> Else
>> MsgBox "Label Printer Not Found", vbCritical + vbOKOnly,
>> "Can't Print"
>> End If
>> GoTo ExitFunction
>>
>> ErrTrap:
>> gvarErrNum = Err.Number
>> gvarErrDesc = Err.Description
>> rvarErrorMsg = BuildError("PrintTags", "mdlGlobalFunctions",
>> CNames(conintUser), gvarErrNum, gvarErrDesc, rvarErrorMsg)
>>
>> ExitFunction:
>> End Function
The only way I've found to do this successfully is to:
Application.Echo False
DoCmd.OpenReport RptName, acViewDesign
'Make your changes
DoCmd.Close acReport, RptName
DoCmd.PrintOut
Application.Echo True
(untested code, but enough to get the gist)
Ugly, huh?
Re: Default use Specific Printer and Label Size
am 02.11.2007 22:53:25 von Arc
Thanks, however this is a .mde file, so the design view wouldn't be
available. :(
"Stuart McCall" wrote in message
news:fgfp1q$4m1$1$8302bc10@news.demon.co.uk...
> "ARC" wrote in message
> news:UzIWi.3963$Nz7.2323@nlpi070.nbdc.sbc.com...
>> Where are you placing the function you wrote?
>>
>> I found a strange thing with trying to set the paper size using the
>> application.printer object. Using the code I'll paste below, as long as
>> you Preview the report, it will set the paper size. However, if you just
>> go straight to printing (using the docmd.openreport.... acNormal), the
>> code below doesn't work, even though I have the code in the On_open of
>> the report, so it is firing. Any ideas on that? If using acNormal causes
>> any application.printer commands to be ignored, then I need to somehow
>> find a different solution, as many of my customers like to print, rather
>> than preview first. Thanks!
>>
>>
>> Dim rpt As Access.Report
>> Set rpt = Reports(Forms!frmOpt.Form!RunName.Caption)
>> 'Set the default printer's orientation to landscape
>> 'rpt.Printer.Orientation = acPRORLandscape
>> 'Set the default printer's paper size to legal
>> If TempVars!PaperSize <> 1 Then
>> rpt.Printer.PaperSize = TempVars!PaperSize
>> End If
>>
>>
>>
>> wrote in message
>> news:1193950736.548032.296910@e34g2000pro.googlegroups.com.. .
>>> On Nov 1, 2:11 pm, raf_technolog...@yahoo.com wrote:
>>>> On Oct 17, 5:10 am, Doug wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> > Ian,
>>>> > We've been having the identical problem for the past year and have
>>>> > been
>>>> > unable to find a solution.
>>>>
>>>> > The problem started when we upgraded Access on all of the
>>>> > workstations.
>>>> > We only put the full versions on the computers where design work was
>>>> > being done since the company doesn't have that many licenses. We may
>>>> > try
>>>> > loading full versions on the computers that are used for printing
>>>> > labels
>>>> > to see if that helps. We have a feeling, though, that whenever we
>>>> > update
>>>> > the .mdb, we might still need to open and save the label report in
>>>> > design mode on each computer.
>>>>
>>>> > If we make any progress I will post it here. Please do the same if
>>>> > you
>>>> > find anything.
>>>>
>>>> > Doug
>>>>
>>>> > *** Sent via Developersdexhttp://www.developersdex.com***
>>>>
>>>> Hello All,
>>>> Take a look at these articles...they should help you out.
>>>> The first will show how to change page settings and the second shows
>>>> you all the setting values
>>>>
>>>> http://support.microsoft.com/?kbid=302416
>>>>
>>>> http://msdn.microsoft.com/archive/default.asp?url=/archive/e n-us/dnar...
>>>>
>>>> Happy Printing,
>>>> Rob F- Hide quoted text -
>>>>
>>>> - Show quoted text -
>>>
>>> Sorry guys, I missed the MDE part of that.
>>>
>>> Here's a function I wrote that uses the Application.Printer object.
>>> This seems to work great with the MDE I distribute to the desktop....
>>> Best Regards, Rob F
>>>
>>> Public Function PrintTags(ByVal vlngNumber, ByVal vintChangeFlag,
>>> Optional ByRef rvarErrorMsg As Variant)
>>> 'This function prints a tag a specified number of times
>>> Dim lngNumber As Long
>>> Dim prt As Printer
>>> Dim strDefault As String
>>> Dim blnFound As Boolean
>>> On Error GoTo ErrTrap
>>> If vlngNumber = 0 Then Exit Function
>>> strDefault = Application.Printer.DeviceName
>>> blnFound = False
>>>
>>> 'print to the label printer
>>> For Each prt In Printers
>>> If InStr(1, prt.DeviceName, "label") Then
>>> Application.Printer = prt
>>> Application.Printer.PaperSize = acPRPSUser
>>> If LabelType = "Big" Then
>>> Application.Printer.ItemSizeHeight = 2150
>>> Application.Printer.ItemSizeWidth = 4000
>>> Else
>>> Application.Printer.ItemSizeHeight = 1130
>>> Application.Printer.ItemSizeWidth = 3500
>>> End If
>>> Application.Printer.BottomMargin = 0
>>> Application.Printer.TopMargin = 0
>>> Application.Printer.LeftMargin = 0
>>> Application.Printer.RightMargin = 0
>>> Application.Printer.Orientation = acPRORLandscape
>>> blnFound = True
>>> GoTo FoundPrinter
>>> End If
>>> Next prt
>>>
>>>
>>> FoundPrinter:
>>> If blnFound Then
>>> If IsNull(vintChangeFlag) Then vintChangeFlag = 0
>>> If vintChangeFlag < 2 Then
>>> lngNumber = Nz(vlngNumber, 0)
>>> Do While lngNumber > 0
>>> If LabelType = "Big" Then
>>> If GetLocation = "SHPS" Then
>>> DoCmd.OpenReport
>>> "rptLabelSeikoIndividualBig_SHPS"
>>> Else
>>> DoCmd.OpenReport "rptLabelSeikoIndividualBig"
>>> End If
>>> Else
>>> DoCmd.OpenReport "rptLabelSeikoIndividual"
>>> End If
>>> lngNumber = lngNumber - 1
>>> Loop
>>> End If
>>> Application.Printer = Nothing
>>> Else
>>> MsgBox "Label Printer Not Found", vbCritical + vbOKOnly,
>>> "Can't Print"
>>> End If
>>> GoTo ExitFunction
>>>
>>> ErrTrap:
>>> gvarErrNum = Err.Number
>>> gvarErrDesc = Err.Description
>>> rvarErrorMsg = BuildError("PrintTags", "mdlGlobalFunctions",
>>> CNames(conintUser), gvarErrNum, gvarErrDesc, rvarErrorMsg)
>>>
>>> ExitFunction:
>>> End Function
>
> The only way I've found to do this successfully is to:
>
> Application.Echo False
> DoCmd.OpenReport RptName, acViewDesign
> 'Make your changes
> DoCmd.Close acReport, RptName
> DoCmd.PrintOut
> Application.Echo True
>
> (untested code, but enough to get the gist)
>
> Ugly, huh?
>
>
>
Re: Default use Specific Printer and Label Size
am 03.11.2007 00:38:22 von Stuart McCall
"ARC" wrote in message
news:i%MWi.4001$Nz7.408@nlpi070.nbdc.sbc.com...
> Thanks, however this is a .mde file, so the design view wouldn't be
> available. :(
Rats! Should have looked back up the thread. Apologies for wasting your
time.
Re: Default use Specific Printer and Label Size
am 03.11.2007 18:42:18 von Arc
No worries at all.. Thanks for the reply!
You know what's strange, I never had this issue at all with the access 97
version. However, I did make a change. I was using a printers api module in
the 97 version, that I had downloaded from the Access Web. With the 2007
version, I switched to using the application.printer object.
Now I have removed all the old code from the printers api, and have no way
of knowing if it's the change from the api, to the application.printer
object, or access 2007. And, I never used the api printers unless they
specifically designated a different printer. So this is a strange one. Of
course my reports are designed in letter mode since I'm in the US, however
they are designed to be closer to 7" wide, rather than 8.5", which has
accommodated the A4 paper size in the past.
Andy
"Stuart McCall" wrote in message
news:fggce9$9hi$1$8300dec7@news.demon.co.uk...
> "ARC" wrote in message
> news:i%MWi.4001$Nz7.408@nlpi070.nbdc.sbc.com...
>> Thanks, however this is a .mde file, so the design view wouldn't be
>> available. :(
>
> Rats! Should have looked back up the thread. Apologies for wasting your
> time.
>
>
>
Re: Default use Specific Printer and Label Size
am 03.11.2007 19:48:22 von Stuart McCall
"ARC" wrote in message
news:Sp2Xi.13966$Pv2.11729@newssvr23.news.prodigy.net...
> No worries at all.. Thanks for the reply!
>
> You know what's strange, I never had this issue at all with the access 97
> version. However, I did make a change. I was using a printers api module
> in the 97 version, that I had downloaded from the Access Web. With the
> 2007 version, I switched to using the application.printer object.
>
> Now I have removed all the old code from the printers api, and have no way
> of knowing if it's the change from the api, to the application.printer
> object, or access 2007. And, I never used the api printers unless they
> specifically designated a different printer. So this is a strange one. Of
> course my reports are designed in letter mode since I'm in the US, however
> they are designed to be closer to 7" wide, rather than 8.5", which has
> accommodated the A4 paper size in the past.
>
> Andy
> "Stuart McCall" wrote in message
> news:fggce9$9hi$1$8300dec7@news.demon.co.uk...
>> "ARC" wrote in message
>> news:i%MWi.4001$Nz7.408@nlpi070.nbdc.sbc.com...
>>> Thanks, however this is a .mde file, so the design view wouldn't be
>>> available. :(
>>
>> Rats! Should have looked back up the thread. Apologies for wasting your
>> time.
Well from the looks of things, the workaround would be to have clone
reports, each set up with a specific paper size/orientation. Not elegant,
but if it works... (and doesn't bloat the file too much)