Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Printer Change Code (Mr. A. Kallal)

Discussion in 'Information Technology' started by Mike, Oct 26, 2005.

  1. Mike

    Expand Collapse


    While doing a websearch on changing printers for Access 2000 I came
    across your site and downloaded your code (printch2k) and implemented
    it into my program.

    All works fine accept the return to the default printer, it does not
    work in my case, there is no default printer set after the code is run
    if I look at the printersection! So afterwards I have to manually set
    the defaultprinter again.

    My guess the problem is the writing to the win.ini file, because I see
    nothing of a device in that file? I use windowsXP and Access 2000,
    could that be a problem?

    Any help much appreciated,

    Thanks, Mike
  2. Loading...

    Similar Threads Forum Date
    SciTech Future Of Organs? Synthetic Tissue Built With 3-D Printer Breaking News Apr 6, 2013
    Can Sikhi Be Relevant In The Modern World As A Driver For Social Change? Blogs Feb 22, 2017
    Interfaith A Sikh Change Comes To Houston’s Finest Interfaith Dialogues Mar 3, 2016
    Angry Exchanges With Christians Blogs Oct 17, 2015
    Day 1-Forever Changes, Love Blogs Oct 17, 2015

  3. OP
    Albert D.Kallal

    Albert D.Kallal
    Expand Collapse

    yes, I seen that problem of the "default" printer going away. I believe that
    the default printer is still set, but the "icon" does not show as such...

    That code was/is designed to run on windows 95, 98, and thus it not the best
    for windows XP (it does work as you note).

    With a2002 and later, there is a built in printer object, and thus you don't
    need my code anymore..

    I don't have a solution to your problem, but it been a while since I looked
    at that code.

    You could try removing the code that is supposed "prevent this" problem.

    So, try commenting out the

    Call SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0, ByVal "windows")

    The above updates windows to show the correct default printer. Since you are
    switching back, then remove the above line...it might fix your problem
    because less effort will be made to show the "new" default printer that you
    only use for a short time......

    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada
  4. OP

    Expand Collapse

    Thanks for the respons, already tried to remove that line but no luck!

    I however managed to get my problem fixed with a combination of your
    code and the code on


    Don't know how it wokrs, but it works!

    But thanks again,

Since you're here... we have a small favor to ask...     Become a Supporter      ::     Make a Contribution     

Share This Page