Start up Command Line Options. Do They work?

RogerC@lotw

New member
Local time
Today, 00:46
Joined
Feb 23, 2004
Messages
9
I have been trying to get the user id to be recongnized when inputting it on the command line behind the path. As such: /user username. I can't get it to recognize the user within Access. Any help would be appreciated.
 
What does the CurrentUser() function return?
 
dcx693 said:
What does the CurrentUser() function return?

It returns 'admin'. That is why I am so confused. it should be the user name behind the /user command.

Confused!
 
Do you even get a log on window? With the username and asking you for the password?
 
dcx693 said:
Do you even get a log on window? With the username and asking you for the password?

I don't have passwords included. I am just checking for user id so as to display updates or inquires. I do not have a need to use passwords. To answer your question NO I don't get that pop up.
 
What is the exact syntax of your command line? On my system, and I would expect on a "normal" Access system, when you change the user name, you should need to enter a password of some sort.

You said that "Admin" is the name you get when you use the CurrentUser() function. In truth, Access security is always turned on. Unless you change the default security settings, everyone in the world gets the same default Admin user with no password as their default user. That's why everyone can openly share files with one another - even though Access security is turned on.

Anyway, somehow, the user name you are passing in your command line is not being processed correctly by Access (obviously). Let's take a look at your command line syntax to see if that's an issue.
 
Command Line Options

Here is the exact syntax I have been using. I have tried both ways as listed below.

"S:\LOTW docs\Item and Price Database\Items and Pricing DB.mdb" /user Roger

"S:\LOTW docs\Item and Price Database\Items and Pricing DB.mdb" "/user Roger"
 
I knew we'd find the answer this way. In order for the command line options to work, you actually have to call the command to the program from the command line. You need something like:
Code:
"C:\Program Files\Microsoft Office 2000\Office\MSACCESS.EXE" 
"S:\LOTW docs\Item and Price Database\Items and Pricing DB.mdb" /user Roger
What this will do, however, is require you to log into your database using Microsoft Access security. I suspect that this will NOT be what you want.

If you just want to be able to pass some type of value to Access using the command line of an icon, then just use the /cmd parameter like this:
Code:
"C:\Program Files\Microsoft Office 2000\Office\MSACCESS.EXE" 
"S:\LOTW docs\Item and Price Database\Items and Pricing DB.mdb" /cmd Roger
You'll be able to get the parameter you passed using the Command() function.
 

Users who are viewing this thread

Back
Top Bottom