PC Review
Forums
Newsgroups
Microsoft Access
Microsoft Access VBA Modules
Access 97 command line switches
Forums
Newsgroups
Microsoft Access
Microsoft Access VBA Modules
Access 97 command line switches
![]() |
Access 97 command line switches |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I'm using an Access97 database as a front-end for
launching another Access97 database. I construct a command string to use Shell(strCmd) where strCmd contains the location of MSACCESS.exe, the database to launch, the username and password, and the workgroup. I want to use the UNC path for the workgroup file, since not all my users are mapped identically. However, Access97's shell command doesn't seem to like this. This strategy seems to work fine with 2000 and 2002. Anybody know how to do what I want to do in '97? Thanks, Pat |
|
|
|
#2 |
|
Guest
Posts: n/a
|
"Patrick McGuire" <anonymous@discussions.microsoft.com> wrote in
news:096e01c3a7a0$a0363960$a401280a@phx.gbl: > However, Access97's shell > command doesn't seem to like this. This strategy seems to > work fine with 2000 and 2002. It would help if you provided the code you're using. In general, this could be associated with spaces in folder names. Make sure that you double- up the quotes around each option before calling Shell. -- Dev |
|
|
|
#3 |
|
Guest
Posts: n/a
|
As it happens, it appears to be the presence of a dash (-)
in one of the folder names in the path. While the 2000 and XP versions handle the dash without a problem, I needed to double up the dash to get the 97 version to accept it. >-----Original Message----- >"Patrick McGuire" <anonymous@discussions.microsoft.com> wrote in >news:096e01c3a7a0$a0363960$a401280a@phx.gbl: > >> However, Access97's shell >> command doesn't seem to like this. This strategy seems to >> work fine with 2000 and 2002. > >It would help if you provided the code you're using. In general, this >could be associated with spaces in folder names. Make sure that you double- >up the quotes around each option before calling Shell. > > -- Dev >. > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
"Patrick McGuire" <anonymous@discussions.microsoft.com> wrote in
news:04d001c3a7ce$5c5a7700$a101280a@phx.gbl: > As it happens, it appears to be the presence of a dash (-) > in one of the folder names in the path. While the 2000 > and XP versions handle the dash without a problem, I > needed to double up the dash to get the 97 version to > accept it. That's strange; while I haven't worked with Access 97 in a while, I'm pretty sure the only special chars the command line cares for (which you need to double-up) are '/' and ';'. -- Dev |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Here's some I code I use.
hth, Andy '--------------------------------------------------------------------------- ------- 'sOpenMDB ' 'Purpose: ' This service opens another database. ' 'Parameters: ' strInMDB - Database to tbe opened ' 'Notes: ' ' 'Rev Num Date Author Description of Change '------- -------- ------ ---------------------------------------------- ------- ' 002 05/10/00 ash Use Shell vs SendKeys ' Clear the /CMD parameter ' 001 03/01/99 ash Code Courtesy of Dev Ashish '--------------------------------------------------------------------------- ------- Public Sub sOpenMDB _ (strMdbPath As String, _ Optional Secured As Boolean = False, _ Optional strMdwPath As String) On Error GoTo Err_sOpenDataBase Dim rst As Recordset Dim strAccess As String Dim strCmd As String Dim User As String Const QS = """" User = "Admin" strAccess = SysCmd(acSysCmdAccessDir) & "MSACCESS.EXE" strCmd = QS & strAccess & QS & " " If User <> "Admin" Then strCmd = strCmd & " /user " & QS & User & QS & " " End If If File_Exists(strMdwPath) Then strCmd = strCmd & " /wrkgrp " & QS & strMdwPath & QS & " " End If strCmd = strCmd & QS & strMdbPath & QS & " /cmd " Shell strCmd, vbNormalFocus Application.Quit Err_sOpenDataBase: MsgBox Err.Description End Sub "Patrick McGuire" <anonymous@discussions.microsoft.com> wrote in message news:096e01c3a7a0$a0363960$a401280a@phx.gbl... > I'm using an Access97 database as a front-end for > launching another Access97 database. I construct a > command string to use Shell(strCmd) where strCmd contains > the location of MSACCESS.exe, the database to launch, the > username and password, and the workgroup. I want to use > the UNC path for the workgroup file, since not all my > users are mapped identically. However, Access97's shell > command doesn't seem to like this. This strategy seems to > work fine with 2000 and 2002. Anybody know how to do what > I want to do in '97? > > Thanks, > > Pat |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

