472,119 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to Join Security Workgroup in Code

Is there some way of using vba to automate the processe of joining an
Access 97 security workgroup? I typed wrkgadm /? at a command prompt
and it just opens the gui, so I'm not sure what the parameters are for
the command or whether there really are any command line switches for
it. Thank you in advance.
Nov 12 '05 #1
7 9930
"Newbillian" <mo******@yahoo.com> wrote in message
news:d7**************************@posting.google.c om...
Is there some way of using vba to automate the processe of joining an
Access 97 security workgroup? I typed wrkgadm /? at a command prompt
and it just opens the gui, so I'm not sure what the parameters are for
the command or whether there really are any command line switches for
it. Thank you in advance.


"Joining" a workgroup makes it your default for ALL Access sessions where an
alternative is not specified as a command line parameter. That being the case it is
unusual to actually want to join anything but the default unsecured (System.mdw)
file. When you need to use an alternate workgroup for a specific database just use
the command line argument in a custom shortcut. That way you don't affect how Access
works with other files. The syntax is roughly...

"Path to MSAccess.exe" /wrkgrp "path to alternate mdw file" "path to mdb"
Nov 12 '05 #2
The problem arises on machines where users have Access 97 and XP
installed. When the user opens Access XP, 97 loses it's membership to
the network based mdw file that it was joined to earlier and defaults
to the winnt/system32/system.mdw file the next time Access 97 is
opened. I'm just trying to automate the whole gui process of the user
bringing up the dialog box and browsing to the network mdw in order to
join the workgroup and want to make some kind of batch file where the
user just clicks on a desktop icon without going through the
additional steps of joining. I can't figure out what the parameters
are to the wrkgadm.exe file. Thanks in advance for help.
"TC" <a@b.c.d> wrote in message news:<1063340385.860314@teuthos>...
The workgroup file is selected (by whatever means) *before* the database
starts to execute its startup code. So there is no way to use VBA to choose
the workgroup file that will be used for the database from which the VBA is
running.

HTH,
TC
"Newbillian" <mo******@yahoo.com> wrote in message
news:d7**************************@posting.google.c om...
Is there some way of using vba to automate the processe of joining an
Access 97 security workgroup? I typed wrkgadm /? at a command prompt
and it just opens the gui, so I'm not sure what the parameters are for
the command or whether there really are any command line switches for
it. Thank you in advance.

Nov 12 '05 #3
TC
Then you just need each PC to have a shortcut with:

"full path to msaccess.exe" /wrkgrp "full path to workgroup file" "full
path to mdb file"

Then, Access will use the specified workgroup file, regardless of which one
is the current wrkgadm.exe default.

HTH,
TC
Newbillian <mo******@yahoo.com> wrote in message
news:d7*************************@posting.google.co m...
The problem arises on machines where users have Access 97 and XP
installed. When the user opens Access XP, 97 loses it's membership to
the network based mdw file that it was joined to earlier and defaults
to the winnt/system32/system.mdw file the next time Access 97 is
opened. I'm just trying to automate the whole gui process of the user
bringing up the dialog box and browsing to the network mdw in order to
join the workgroup and want to make some kind of batch file where the
user just clicks on a desktop icon without going through the
additional steps of joining. I can't figure out what the parameters
are to the wrkgadm.exe file. Thanks in advance for help.
"TC" <a@b.c.d> wrote in message news:<1063340385.860314@teuthos>...
The workgroup file is selected (by whatever means) *before* the database
starts to execute its startup code. So there is no way to use VBA to choose the workgroup file that will be used for the database from which the VBA is running.

HTH,
TC
"Newbillian" <mo******@yahoo.com> wrote in message
news:d7**************************@posting.google.c om...
Is there some way of using vba to automate the processe of joining an
Access 97 security workgroup? I typed wrkgadm /? at a command prompt
and it just opens the gui, so I'm not sure what the parameters are for
the command or whether there really are any command line switches for
it. Thank you in advance.

Nov 12 '05 #4
"Rick Brandt" <RB*****@Hunter.Com> wrote in message news:<bj************@ID-98015.news.uni-berlin.de>...
"Newbillian" <mo******@yahoo.com> wrote in message
news:d7**************************@posting.google.c om...
Is there some way of using vba to automate the processe of joining an
Access 97 security workgroup? I typed wrkgadm /? at a command prompt
and it just opens the gui, so I'm not sure what the parameters are for
the command or whether there really are any command line switches for
it. Thank you in advance.


"Joining" a workgroup makes it your default for ALL Access sessions where an
alternative is not specified as a command line parameter. That being the case it is
unusual to actually want to join anything but the default unsecured (System.mdw)
file. When you need to use an alternate workgroup for a specific database just use
the command line argument in a custom shortcut. That way you don't affect how Access
works with other files. The syntax is roughly...

"Path to MSAccess.exe" /wrkgrp "path to alternate mdw file" "path to mdb"


What I'm really trying to ask is whether or not it is possible to make
some kind of command line batch file for joining an access workgroup
without going through the steps in the gui. I can't tell if there are
any command line switches for the wrkgadm.exe file because
"wrkgadm.exe /?" from a command prompt does not bring up any help.
Using a shortcut to an mdb file with a path to the mdw file works for
that instance of access but doesn't really join the machine
permanently to the workgroup. Is there any workaround? Thanx in
advance.
Nov 12 '05 #5
"Newbillian" <mo******@yahoo.com> wrote in message
news:d7**************************@posting.google.c om...

What I'm really trying to ask is whether or not it is possible to make
some kind of command line batch file for joining an access workgroup
without going through the steps in the gui. I can't tell if there are
any command line switches for the wrkgadm.exe file because
"wrkgadm.exe /?" from a command prompt does not bring up any help.
Using a shortcut to an mdb file with a path to the mdw file works for
that instance of access but doesn't really join the machine
permanently to the workgroup. Is there any workaround? Thanx in
advance.


Not that I'm aware of. As I stated, it is very rare for someone to actually want to
permanently join a different Workgroup, so I guess the issue just hasn't come up
before.
Nov 12 '05 #6
TC
See my other reply in this thread.

TC
"Newbillian" <mo******@yahoo.com> wrote in message
news:d7**************************@posting.google.c om...
"TC" <a@b.c.d> wrote in message news:<1063431981.92915@teuthos>...
Then you just need each PC to have a shortcut with:

"full path to msaccess.exe" /wrkgrp "full path to workgroup file" "full path to mdb file"

Then, Access will use the specified workgroup file, regardless of which one is the current wrkgadm.exe default.

HTH,
TC
Newbillian <mo******@yahoo.com> wrote in message
news:d7*************************@posting.google.co m...
The problem arises on machines where users have Access 97 and XP
installed. When the user opens Access XP, 97 loses it's membership to
the network based mdw file that it was joined to earlier and defaults
to the winnt/system32/system.mdw file the next time Access 97 is
opened. I'm just trying to automate the whole gui process of the user
bringing up the dialog box and browsing to the network mdw in order to
join the workgroup and want to make some kind of batch file where the
user just clicks on a desktop icon without going through the
additional steps of joining. I can't figure out what the parameters
are to the wrkgadm.exe file. Thanks in advance for help.
"TC" <a@b.c.d> wrote in message news:<1063340385.860314@teuthos>...
> The workgroup file is selected (by whatever means) *before* the database > starts to execute its startup code. So there is no way to use VBA to

choose
> the workgroup file that will be used for the database from which the VBA
is
> running.
>
> HTH,
> TC
>
>
> "Newbillian" <mo******@yahoo.com> wrote in message
> news:d7**************************@posting.google.c om...
> > Is there some way of using vba to automate the processe of joining

an > > Access 97 security workgroup? I typed wrkgadm /? at a command prompt > > and it just opens the gui, so I'm not sure what the parameters are for > > the command or whether there really are any command line switches for > > it. Thank you in advance.

What I'm really trying to ask is whether or not it is possible to make
some kind of command line batch file for joining an access workgroup
without going through the steps in the gui. I can't tell if there are
any command line switches for the wrkgadm.exe file because
"wrkgadm.exe /?" from a command prompt does not bring up any help.
Using a shortcut to an mdb file with a path to the mdw file works for
that instance of access but doesn't really join the machine
permanently to the workgroup. Is there any workaround? Thanx in
advance.

Nov 12 '05 #7
TC

"Newbillian" <mo******@yahoo.com> wrote in message
news:d7**************************@posting.google.c om...
"Rick Brandt" <RB*****@Hunter.Com> wrote in message news:<bj************@ID-98015.news.uni-berlin.de>...
"Newbillian" <mo******@yahoo.com> wrote in message
news:d7**************************@posting.google.c om...
Is there some way of using vba to automate the processe of joining an
Access 97 security workgroup? I typed wrkgadm /? at a command prompt
and it just opens the gui, so I'm not sure what the parameters are for
the command or whether there really are any command line switches for
it. Thank you in advance.


"Joining" a workgroup makes it your default for ALL Access sessions where an alternative is not specified as a command line parameter. That being the case it is unusual to actually want to join anything but the default unsecured (System.mdw) file. When you need to use an alternate workgroup for a specific database just use the command line argument in a custom shortcut. That way you don't affect how Access works with other files. The syntax is roughly...

"Path to MSAccess.exe" /wrkgrp "path to alternate mdw file" "path to

mdb"
What I'm really trying to ask is whether or not it is possible to make
some kind of command line batch file for joining an access workgroup
without going through the steps in the gui. I can't tell if there are
any command line switches for the wrkgadm.exe file because
"wrkgadm.exe /?" from a command prompt does not bring up any help.
Using a shortcut to an mdb file with a path to the mdw file works for
that instance of access but doesn't really join the machine
permanently to the workgroup. Is there any workaround? Thanx in
advance.


When you join a different workgroup file using wrkgadm.exe, all this really
does is to change the value of a certain key within the registry. I don't
remember which one it is, but you could easily find this by searching the
registry for occurrences of your current default workgroup filename. Then
use the win32 registry APIs, or REGEDIT files, or whatever, to update that
value as required. I'm fairly sure that nothing else is required - just
amend the registry value.

HTH,
TC

Nov 12 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dariusz | last post: by
2 posts views Thread by Mark Lees | last post: by
reply views Thread by Mark Broadbent | last post: by
2 posts views Thread by Rama Sharma | last post: by
1 post views Thread by Danko Greiner | last post: by
28 posts views Thread by Andre | last post: by

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.