473,322 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

multiple users

ken
Is there a way to check if access has not been used for say 10 minutes
and then to close the front end? I was just thinking that that might be
a good idea since a lot of people like having their frontends alway
open and that is not good...

Nov 13 '05 #1
4 1768
ken wrote:
Is there a way to check if access has not been used for say 10 minutes
and then to close the front end? I was just thinking that that might
be a good idea since a lot of people like having their frontends alway
open and that is not good...


It can be done, but it's not trivial because there is no built in method for
detecting "idle time". You could have a hidden form with a Timer event and
when certain events happen you could reset that Timer. The problem is you
would have to reset that Timer in EVERY possible event to be able to tell if
the user was not doing anything.

If you are satisfied with only resetting the timer on fewer more significant
events (opening a form or report, saving a record, etc.), then it becomes
more practical, but you also run the risk of closing the app when the user
is really doing something that you were not monitoring.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
ken
ok what about...the posibility of one front end finding out who is
using the record that they are on...or maybe a way to identify in front
ends who is using the database?

Nov 13 '05 #3
Br
ken <ge****@gmail.com> wrote:
ok what about...the posibility of one front end finding out who is
using the record that they are on...or maybe a way to identify in
front ends who is using the database?


This code builds a list of computer names that are currently connected
to the backend. Users of a system I use this in can still have the
program open at the first switchboard as there is no data access at that
time.

On Error GoTo GetCurrentUsers_err
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long, ds As String
Dim ComputerName As Variant, UserName As Variant
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * FROM appCurrentUsers;"
DoCmd.SetWarnings True
ds = GetDataLocation() ' a function a returns the path to the backend
database
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "Data Source=" & ds
'cn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & ds
Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
Dim rsOut As DAO.Recordset
Set rsOut = CurrentDb.OpenRecordset("appCurrentUsers",
DB_OPEN_DYNASET)
With rsOut
While Not rs.EOF
UserName = Trim(rs.Fields(1))
UserName = Left(UserName, Len(UserName) - 1)
ComputerName = Trim(rs.Fields(0))
ComputerName = Left(ComputerName, Len(ComputerName) - 1)
.AddNew
If UserName = "Admin" Then
![UserName] = CurrentUser
![Computer] = ComputerName & " (local)"
Else
![UserName] = UserName
![Computer] = ComputerName
End If
![Connected] = rs.Fields(2)
![SuspectState] = rs.Fields(3)
.Update
rs.MoveNext
Wend
End With

--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #4
Br
ken <ge****@gmail.com> wrote:
ok what about...the posibility of one front end finding out who is
using the record that they are on...or maybe a way to identify in
front ends who is using the database?


This code builds a list of computer names that are currently connected
to the backend. Users of a system I use this in can still have the
program open at the first switchboard as there is no data access at that
time.

On Error GoTo GetCurrentUsers_err
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long, ds As String
Dim ComputerName As Variant, UserName As Variant
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * FROM appCurrentUsers;"
DoCmd.SetWarnings True
ds = GetDataLocation() ' a function a returns the path to the backend
database
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "Data Source=" & ds
'cn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & ds
Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
Dim rsOut As DAO.Recordset
Set rsOut = CurrentDb.OpenRecordset("appCurrentUsers",
DB_OPEN_DYNASET)
With rsOut
While Not rs.EOF
UserName = Trim(rs.Fields(1))
UserName = Left(UserName, Len(UserName) - 1)
ComputerName = Trim(rs.Fields(0))
ComputerName = Left(ComputerName, Len(ComputerName) - 1)
.AddNew
If UserName = "Admin" Then
![UserName] = CurrentUser
![Computer] = ComputerName & " (local)"
Else
![UserName] = UserName
![Computer] = ComputerName
End If
![Connected] = rs.Fields(2)
![SuspectState] = rs.Fields(3)
.Update
rs.MoveNext
Wend
End With

--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Smith | last post by:
I have a user assigned multiple roles and a role can be inherited from multiple parents (see below). How do I answer such questions as "How many roles does the user belongs to?" I answered the...
3
by: rhamlin | last post by:
I'm fairly new to creating complex sql statements and need a little help. In plain english I want to do this: Select menu rows where the row's userGroupIDs equal the user's userGroupIDs. ...
1
by: mary | last post by:
I am developing an Access db which will be used by multiple users. My questions are: Does MS Access have problems with multiple users accessing the db at once? If yes, what is your solution...
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
4
by: tshad | last post by:
Can I set up multiple pages in the same Location tag? I thought I saw somewhere that I could. I tried the following, but it doesn't work. ***************************************************...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
18
by: Gleep | last post by:
I've searched google intensely on this topic and it seems noone really knows how to approch this. The goal I don't want clients to give out their usernames and passwords to friends, since the site...
3
by: Michel | last post by:
Hi, I wrote an app in .Net and I whant only 1 instance of this app open for the user; the user open my app, do some works and try to open another instance of my app, I whant to show a message to...
9
by: TC | last post by:
I need to design a system which represents multiple "projects" in SQL Server. Each project has the same data model, but is independent of all others. My inclination is to use one database to store...
25
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if my question needs to be here or in coldfusion. If i have my question is in the wrong section i am sorry in advance an will move it to the correct section. ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.