is there anyway of seeing how many users are using a database at anyone time and if so is it possible to show their individual IP address or something?!
it looks good but for the moment I've been instructed by higher powers not to have password controlled access - hence users do not log in - they just open up the database over the network - security is being administered with trust and lots of hidden objects and only the magical shift key on open will allow changes.
I just need to be able to see if anyone (other than me) is using the application so i can dive in and make quick mods when no one's accessing.
If that's just the case then the Record Locking Information file that is created when you open an Access database will tell you if there are any other users. If it's there, there's users; if it's not. Pop in and change something.
Are you saying, however, that everyone uses the exact same uncompiled frontend?
The FosUserName() function picks up the users name from the network and posts it to a table. Then a sub form on the main switchboard scans the LogIn table and tells you who's in. The LogOut time is posted to the LogIn table when they log out so only current users are listed.
Alternatively, there is a free download on the internet of a database that was written to allow a user to see who is logged into any selected database. I can't remember where it is so you'll need to search a bit.
I'm under orders not to add security, change to FE and BE etc - I think the powers that be think I'm gonna do one and they'll not be able to figure out where my database is and what it does etc...
I also know about the ldb file -
another reason I want to see how many user are accessed is because I have some stats queries and calcs that slow the application down and also take ages to calculate if there are too many users in the application...
Search the internet is your best bet. Search for "who's logged in Access database" or something. Be careful to download the right one depending on which access version you're using.
What parts do I need to change to make this work in Access 2000? It works by itself, but when I try to import it into another DB it doesn't work. I open the DB and it opens the debugger with this part of the code highlighted
Code:
db As DAO.Database
which is from the following line of code on the hidden form
Code:
Dim db As DAO.Database, rs As DAO.Recordset
And it gives the error "user defined type not defined"
I imported the table, query, 2 forms, macro and 2 modules. I tried this with the Access 97 version and also converted it to 2000 just to try, but neither worked.
I think you may to to activate a .dll components file in VBA -
open up the VB editor, go to Tools menu and chosse references then have a look at the image I've attached and see if any of your components are different to those checked.
Convert your database frontends to DAO. As eggwater says it's a case of selecting the correct reference. Access 2000 defaults to ADO so you should set the priority of Microsoft Data Access Objects 3.6 above that of Microsoft ActiveX Data Objects. That should work.
The other is to convert the DAO code to ADO code. SO, instead of Dim db As DAO.Database etc.
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
For more information on converting from DAO to ADO (probably the better option in your case) you should refer to this thread.