473,386 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Prob's using Albert Kallal's SetDefaultPrinter on some OS's

MLH
I'm using Albert Kallall's code to set printers in A97.
I find that on some machines, the code locks up
and on others, it does not. I would like to overcome
this and was wondering about the experiences of
others who attempt to set default printer in A97?

I have an app running on an XP home edition box
fine. Same app running on XP Professional fails
when SetDefaultPrinter() is called.

I can post more of the code, which may be found
at http://www.members.shaw.ca/AlbertKal.../printch97.zip
but I did not wish to clutter the post with too much
that may distract from the question.
Sep 6 '06 #1
8 1587
MLH wrote:
I'm using Albert Kallall's code to set printers in A97.
I find that on some machines, the code locks up
and on others, it does not. I would like to overcome
this and was wondering about the experiences of
others who attempt to set default printer in A97?

I have an app running on an XP home edition box
fine. Same app running on XP Professional fails
when SetDefaultPrinter() is called.

I can post more of the code, which may be found
at http://www.members.shaw.ca/AlbertKal.../printch97.zip
but I did not wish to clutter the post with too much
that may distract from the question.
I'm using XPPro and don't have a problem. Maybe step through the code
and see where it locks up on one of the machines that locks.
Sep 6 '06 #2
MLH
Thanks, Salad, for the helpful comments.

I had a hunch someone might suggest that. The machine is 75 miles
away. I'll have to RADMIN into it from here. The app on the remote box
is in a runtime environment. I've never tried single stepping in that
situation. Will give 'er a go.

BTW, Salad, with STOP statements in code to simulate breakpoint,
will the one-line-at-a-time execution mode continue if the procedure
with the STOP statement in it calls another procedure? Or, must I
put a STOP in the called procedure as well to carry on with single-
step execution?
>
I'm using XPPro and don't have a problem. Maybe step through the code
and see where it locks up on one of the machines that locks.
Sep 6 '06 #3
MLH wrote:
Thanks, Salad, for the helpful comments.

I had a hunch someone might suggest that. The machine is 75 miles
away. I'll have to RADMIN into it from here. The app on the remote box
is in a runtime environment. I've never tried single stepping in that
situation. Will give 'er a go.
I don't believe you'll be doing anything like that in a runtime environment.
>
BTW, Salad, with STOP statements in code to simulate breakpoint,
will the one-line-at-a-time execution mode continue if the procedure
with the STOP statement in it calls another procedure? Or, must I
put a STOP in the called procedure as well to carry on with single-
step execution?
Sub Proc1()
MsgBox "This is proc1"
Stop
Proc2
End Sub
Sub Proc2()
MsgBox "This is proc2"
'run Proc1 thru, then run again after commenting out next 2 lines
Stop
MsgBox "Proc2 stopped"
End Sub
>
>>I'm using XPPro and don't have a problem. Maybe step through the code
and see where it locks up on one of the machines that locks.

Sep 7 '06 #4
MLH
>I had a hunch someone might suggest that. The machine is 75 miles
away. I'll have to RADMIN into it from here. The app on the remote box
is in a runtime environment. I've never tried single stepping in that
situation. Will give 'er a go.

I don't believe you'll be doing anything like that in a runtime environment.
Well, you are probably right. I've never tried it. But it makes sense
that the access developer team would not provide such debugging
tools at the runtime level. I have no clue how to test for the porint
of failure on the remote installation. Unless someone intimately
familiar with similar issues reads this post and responds with a
working solution - I'm just stuck.
>>
BTW, Salad, with STOP statements in code to simulate breakpoint,
will the one-line-at-a-time execution mode continue if the procedure
with the STOP statement in it calls another procedure? Or, must I
put a STOP in the called procedure as well to carry on with single-
step execution?

Sub Proc1()
MsgBox "This is proc1"
Stop
Proc2
End Sub
Sub Proc2()
MsgBox "This is proc2"
'run Proc1 thru, then run again after commenting out next 2 lines
Stop
MsgBox "Proc2 stopped"
End Sub
OK. Thx. I see how it works now.
Sep 7 '06 #5
MLH wrote:
>>>I had a hunch someone might suggest that. The machine is 75 miles
away. I'll have to RADMIN into it from here. The app on the remote box
is in a runtime environment. I've never tried single stepping in that
situation. Will give 'er a go.

I don't believe you'll be doing anything like that in a runtime environment.


Well, you are probably right. I've never tried it. But it makes sense
that the access developer team would not provide such debugging
tools at the runtime level. I have no clue how to test for the porint
of failure on the remote installation. Unless someone intimately
familiar with similar issues reads this post and responds with a
working solution - I'm just stuck.
Why not create a new database as a runtime. Stuff the printer code in a
module. Then put in a bunch of msgboxes in the code or add a table and
at breakpoints add something to the table that tells you where you got
to before locking. Then run a form that calls the something to executes
the code. It may take passing the person the database a couple of times
till you find the code line that stops.
Sep 7 '06 #6
I would also check if the user in question has restrictions on changing .ini
or registry entries.

Companies that lock down there computers more tight then normal will NOT
give users permissions to change registry entries, and that could/would
include the .ini file which looks like registry settings to windows xp.

Further, I seen even strange behaviours access 97, as once again, it wants
FREE REIN of the machines features.

Since a97 is about 10 years old, then it is little surprise that registry
entries and security issues are a issue. This as a general rule means that
ms-access needs to run on a machine without any restricted group policies.

You might want to check/ask if they are running a domain server (that is
just a fancy term for a "central box" that controls all permissions, and
even logons of EACH computer in the building. (this makes sense, as you
can't possible manage 100's of computers by walking around to each machine!!
Of course, if that domain server ever goes down, then users can't even
logon, or access files on their OWN computers attached to the network!!

This likely some permissions issue, and the user can't change ini files.
Check if the user can even change their default printer manually - they
might not even be able to do that. If they can't change the default printer
manually..my code certainly will not. However, if they *can* change the
default printer, it still might be a permissions issue.

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
Sep 8 '06 #7
"Albert D. Kallal" <Pl*******************@msn.comwrote in
news:Kf7Mg.530409$IK3.132365@pd7tw1no:
Companies that lock down there computers more tight then normal
will NOT give users permissions to change registry entries, and
that could/would include the .ini file which looks like registry
settings to windows xp.
Pardon me, Albert, but you seem to be unfamiliar with the default
configurations of workstations in a domain controller configuration.
The default is to make people members of the Users group only, and
*not* administrators, and then domain policies are applied to the
workstations that prohibit changes to the registry or to the C:
drive outside the user's profile.

Anyone who is *not* planning their Access applications with this in
mind is about 7 years behind the curve -- these changes were
implemented in Win2K.

And when Vista comes out, no matter whether you're in a domain or
not, your apps are all going to break.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Sep 8 '06 #8
MLH
Personally, I found your comments of great interest,
Albert. And I thank you for taking time to post a reply.
Sep 12 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: deko | last post by:
Is there a rule of thumb for quoting variable values? For example, do I have to put all string number values in quotes? strAbc = "3" ? What about long, int and byte? I assume these are NOT...
1
by: Norman Fritag | last post by:
Hi there I have avoided to use active x controls because I thought they are causing more problems then they are doing any good. I a new application I would want to use the tree and list view...
13
by: David Mitchell | last post by:
I use the above function in queries for a number of forms and reports. The reports take approx 20 seconds to open. There are only 100 product id's in tblProducts. My concern is that the time will...
9
by: Jozef | last post by:
Hello, I'd like to get a bit of a pole on what PDA software any (or all ) of you use with MS Access. I'm interested in creating a PDA interface to the database, but was wondering if there is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.