Datafield which shows the logged in users

J

jmslab

Hoi,

Is there a possibilty for creating a datafield on a form in a database
which shows the logged in user(s) at that moment.

For example:
I'm opening Database-1 which starts with Form-1. On Form-1 there is a
log-datafield that shows that user-1 is logged in into this
Database-1.
After a while.... user-2 is logged in into the same Database-1. At
this moment Form-1 should refresh and the log-datafield shows now the
two users that are logged in into this database.
When one of them closes the file, Form-1 refreshed again and the log-
datafield shows the user thats still logged in.

hopely somebody can help me with this.

regards,
Johan
 
J

jmslab

Thanks,
This file helps me in the right direction. I see that I have to figer
out how to prepare the macro on such a way that I can set the selected
file as a default (then you don''t need to select the same file
everytime).
In the mdb file below macro is registered which belong to the button
to select your file. How can I change this macro so it's selecting
automaticle for example "C:/Apps/Test.mdb". Or is there a way that, if
I build this macro in in my own file, it's looks automaticly in the
file were it's build in (should be nicer).

regards,
Johan

Private Sub cmdBrowse_Click()
On Error GoTo ErrHandler

With Me.txtDBPath
.Value = DialogFile(1, _
"Please select an Access database...", _
vbNullString, _
"Access Databases (*.mda, *.mdb, *.mde)|
*.mda;*.mde;*.mdb", _
CurDir(), _
vbNullString)
If Len(.Value) Then
Me.chkUserRoster.Enabled = fIsJet4DB(.Value)
Call cmdExecute_Click
End If
End With
ExitHere:
Exit Sub
ErrHandler:
With Err
MsgBox "Error: " & .Number & vbCrLf & .Description, _
vbCritical Or vbOKOnly, .Source
End With
Resume ExitHere
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top