Results 1 to 9 of 9
  1. #1
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Using Access 2003, in default 2000 file mode.

    I built a database for a friend's Kiwanis club, the main user of which will be my friend, Larry.

    Larry has run into a very strange problem. There is a form in which he can select names and print #10 envelopes, but the envelope report persists in showing up in Letter mode. There are some reports that persist in showing up in #10 envelope mode rather than Letter mode.
    What makes this weird is that I have a code module which sets those reports to the proper printer setting upon startup of the database. So I never run into a problem.
    What makes it doubly weird is that he put the program on his 3 year old laptop and even when hooked up to the same printer it runs without any problem whatsoever.

    The error that he gets when he attempts to change the Page Setup in a report is "out of memory." But his computer is only a year old and he has 2 meg of RAM.

    It's a Canon printer, 2 years old. This is Larry's e-mail message to me.
    "Everything goes well until I attempt to save the printer settings.
    An error box flashes up and then disappears again, covered by another saying "There is not enough memory. Close unneeded programs".
    Bunk I say. Nothing but the database is running, and Task manager says I'm using about 650 mb of 2 Gigs of RAM.
    I have rebooted and tried again, with the same result. Microsoft's error reporting routine tells me I should upgrade from Access 2000.
    I have had him reinstall the printer driver, defrag, uninstall, use Windows Install Clean-up to make sure things are gone, also then put a small file on so there is no imprinting on the same sectors when he reinstalls Office. But none of this has made any difference.

    Here's another message from Larry:
    I copied the front and back ends to the laptop, expecting to have to reconfigure the printer settings.
    Not so. All the reports were properly formatted.
    When I copied the files back to the desktop and ran it, the reports all came up with an envelope setting so I checked the default printer setting.
    Sure enough, it was overriding the database settings.
    I have reset the printer to letter several times now after running the database, and still can't figure out why it is changing.
    Any ideas?

    Tom

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Select Tools | Options...
    Activate the General tab.
    Make sure that the "Track name AutoCorrect info" check box is clear (not ticked).

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    One thing to try is to look at the Print Server settings that establish what the standard forms are for that printer. That is set from the Printer Manager dialog in most versions of Windows - Vista seems to be a bit different however. That also suggests we need to know the OS version on both his laptop and on the desktop - I've personally seen a few weird things with printers on both Windows XP and Vista.
    Wendell

  4. #4
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='771345' date='20-Apr-2009 13:34']Select Tools | Options...
    Activate the General tab.
    Make sure that the "Track name AutoCorrect info" check box is clear (not ticked).[/quote]
    Thanks, Hans.

    I haven't used Name Auto Correct for years.

    Tom

  5. #5
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='WendellB' post='771346' date='20-Apr-2009 13:36']One thing to try is to look at the Print Server settings that establish what the standard forms are for that printer. That is set from the Printer Manager dialog in most versions of Windows - Vista seems to be a bit different however. That also suggests we need to know the OS version on both his laptop and on the desktop - I've personally seen a few weird things with printers on both Windows XP and Vista.[/quote]
    Wendell
    This is the module I have been using, and it has worked perfectly for both XP and Vista computers, and also with Access 2000 and 2003.

    [codebox]Option Compare Database
    Option Explicit

    Type str_DEVMODE
    RGB As String * 94
    End Type

    Type type_DEVMODE
    strDeviceName As String * 16
    intSpecVersion As Integer
    intDriverVersion As Integer
    intSize As Integer
    intDriverExtra As Integer
    lngFields As Long
    intOrientation As Integer
    intPaperSize As Integer
    intPaperLength As Integer
    intPaperWidth As Integer
    intScale As Integer
    intCopies As Integer
    intDefaultSource As Integer
    intPrintQuality As Integer
    intColor As Integer
    intDuplex As Integer
    intResolution As Integer
    intTTOption As Integer
    intCollate As Integer
    strFormName As String * 16
    lngPad As Long
    lngBits As Long
    lngPW As Long
    lngPH As Long
    lngDFI As Long
    lngDFr As Long
    End Type

    Public Function SetEnvelope(strName As String)
    Dim rpt As Report
    Dim strDevModeExtra As String
    Dim DevString As str_DEVMODE
    Dim DM As type_DEVMODE

    On Error GoTo SetEnvelope_Error

    DoCmd.Echo False
    DoCmd.OpenReport strName, acDesign 'Opens report in Design view.

    Set rpt = Reports(strName)

    If Not IsNull(rpt.PrtDevMode) Then
    strDevModeExtra = rpt.PrtDevMode
    DevString.RGB = strDevModeExtra
    LSet DM = DevString
    DM.lngFields = DM.lngFields Or DM.intOrientation 'Initialize fields.
    DM.intPaperSize = 20 '#10 Envelope size
    DM.intOrientation = 2 'Landscape
    LSet DevString = DM 'Update property.
    Mid(strDevModeExtra, 1, 94) = DevString.RGB
    rpt.PrtDevMode = strDevModeExtra
    DoCmd.Save acReport, strName
    DoCmd.Close acReport, strName

    DoCmd.Echo True
    End If

    Set rpt = Nothing

    On Error GoTo 0
    Exit Function

    SetEnvelope_Error:

    MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure SetEnvelope of Module ModuleForSetting#10Envelopes"

    End Function
    [/codebox]

    Tom

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    This sort of stuff can drive you up the wall. What is the version of the operating system on the one that doesn't behave? It is possible that you have a driver problem, particularly if you are running Vista and using an XP driver. Also, both sizes of paper must be installed as forms in the Print Server, and the names you set in code have to match exactly what the names of the forms are in the Print Server. I have one client where we never have been able to get the print settings to stick. They will work on other PCs when we put out a new version, but on that PC we always have to reconfigure the print settings each time. Been going on for two years - but we are about to put a bullet in that PC and buy a new one for that staff member.
    Wendell

  7. #7
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='WendellB' post='771637' date='21-Apr-2009 22:24']This sort of stuff can drive you up the wall. What is the version of the operating system on the one that doesn't behave? It is possible that you have a driver problem, particularly if you are running Vista and using an XP driver. Also, both sizes of paper must be installed as forms in the Print Server, and the names you set in code have to match exactly what the names of the forms are in the Print Server. I have one client where we never have been able to get the print settings to stick. They will work on other PCs when we put out a new version, but on that PC we always have to reconfigure the print settings each time. Been going on for two years - but we are about to put a bullet in that PC and buy a new one for that staff member.[/quote]
    Well, no kidding...this sort of stuff can drive you up the wall.

    I will have to check the version of the operating system on the computer that doesn't behave. But that machine is only one year old, so I doubt that Larry is up to putting a bullet in the thing yet. (I might do that but I'm far less patient than he is!)

    I'm not clear what you mean by both sizes of paper must be installed as forms in the Print Server. I don't have a setting such as that on my computer, in Printers in the Control Panel. But maybe I don't know exactly what you mean so don't know exactly where to look.

    Tom

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    In the Printers and Fax Devices control panel, select File | Server Properties.
    The Forms list box in the Forms tab displays all defined page sizes - is Envelope #10 listed there?

  9. #9
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='771646' date='21-Apr-2009 23:40']In the Printers and Fax Devices control panel, select File | Server Properties.
    The Forms list box in the Forms tab displays all defined page sizes - is Envelope #10 listed there?[/quote]
    Hans
    Thanks. We aren't able to find "File | Server" properties. But we can find the printer. And yes, Envelope #10 is listed.

    However, this may be a moot point, as Larry indicates that since he installed Office 2003 things seem to be holding. Good news!

    Tom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •