Re: Current User List



Instead of

Set cnn= CurrentProject.Connection

try

Set cnn= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\mydatabase.mdb;Jet OLEDB:System Database=system.mdw;User
ID=myUsername;Password=myPassword;"

(You can find any connection string you might need at
http://www.carlprothman.net or at http://www.connectionstrings.com.
Unfortunately, Carl's site seems to have some technical problem at the
moment.)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Sprinks" <Sprinks@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:68AB5262-221A-44D1-A459-763477778EA4@xxxxxxxxxxxxxxxx
Douglas,

Thank you for your response.

I added the sub to a global module, changing the name of the datasource
parameters in the Open method calls to the name of my back-end file.

On running the procedure from the Immediate Window, I first got a "You do
not have appropriate permissions to open...contact your SysAdmin..."
error.
After consulting VBA Help, I added the optional username and password
parameters to both calls. It now returns the following error:

Run-time error '-2147217843 (8004e4d)':

Cannot start your application. The workgroup information file is missing
or
opened exclusively by another user.

I don't see, however, how I can pass the workgroup file name to the
method.
Do you have a suggestion?

Thank you.
Sprinks


"Douglas J. Steele" wrote:

See whether http://support.microsoft.com/kb/198755 is what you're looking
for.

(Don't worry that it says "Access 2000": it applies to any ADO connection
to
the database)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Sprinks" <Sprinks@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B8FDD630-6933-425E-BF1A-A2BABA8BC8D7@xxxxxxxxxxxxxxxx
Litwin, Getz, & Gunderloy, in Access 2002 Enterprise Developer's
Handbook
offer a BuildUserList() procedure that lists all current users in the
database, setting an ADODB.Connection variable to the current project:

Set cnn= CurrentProject.Connection

As I do not have the CD and will have to type this sub in manually, I
wondered if anyone knew whether this would find all users connected to
the
shared back-end through their local front-ends.

Thanks for any assistance.
Sprinks





.



Relevant Pages

  • Re: ISAM error when trying to create tablelink
    ... Doug Steele, Microsoft Access MVP ... I updated str so ... What you've got appears to be an Ole DB connection string (actually, ...
    (microsoft.public.access.modulesdaovba)
  • Re: DSN-less connection to an Informix Database
    ... Sorry, I've got no experience at all with Informix, but looking at what Carl ... Doug Steele, Microsoft Access MVP ... I too suspected the connection string to be the problem so I modified the ... so I assume that the driver name isn't the problem. ...
    (microsoft.public.access.modulesdaovba)
  • Re: DSN-less connection to an Informix Database
    ... I removed the spaces around the equal signs and added the "Dsn=" to my ... I noticed that Carl's site has connection string formats for versions 2.5 ... Doug Steele, Microsoft Access MVP ... driver name to test that it is valid. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Cannot open ADO connection to Access 2007 accdb
    ... Doug Steele, Microsoft Access MVP ... I am using a connection string that connects to the backend database ... I have converted all of the mdbs involved to accdb format. ...
    (microsoft.public.access.modulesdaovba)
  • Re: How to create a connection in Access database?
    ... Set cnn = CurrentProject.Connection ... Sorry for the confusion ... >Gerald Stanley MCSD ... >>connection string. ...
    (microsoft.public.access.modulesdaovba)

Loading