Results 1 to 5 of 5

Thread: User Logging

  1. #1
    Join Date
    Oct 2013
    Posts
    22

    Unanswered: User Logging

    Hello Friends..

    I have split database with few users, I want to have all users logging info to know who is currently logged and their history, after lot of search i have come across one application (attached) nicely made, I have copied table to backend and frmmonitor, frmuserlog, frmmenuforms & moduserlog to all front ends and added code to startup form (loginform) as
    Code:
    Private Sub Form_Load()
        DoCmd.OpenForm "frmMonitor", , , , , acHidden
    End Sub
    and to last form in quit command

    Code:
    DoCmd.Close acForm, "frmMonitor"
    This works ok when any or all user logins and shows on userlog form who are logged in current and their history, but problem is when any user logs out/close his front end, userlog will show that all were logged out at the same time even others still working.

    I think iam missing somewhere, I have little/no knowledge about coding in vba.. please help me.. Thanks in advance..
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    sorry cant replicate that behaviour here
    you are taking one heck of a risk using forms that you have found elsewhere and not understand what is going on

    personally I wouldn't touch environ with a barge pole, the API windows logon is much more dependable (see dev ashish api on google for details. his API call can also tell you the computer name so not only do you know who logged on but from where. but I suppose environ is better than the Access function current user

    lookign at teh code it seems to do what I'd expect, but like I say I can't replicate the symptoms you describe
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    FYI, I, too, cannot replicate your problem; when I log out the Table only shows me as doing so!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Oct 2013
    Posts
    22

    user unlogging

    Thanks to all..

    This happens when other user (say xyz) logs out and in my userlog form ie Admin (which is still logged in) shows both xyz and admin are logged out on same time even admin was not logged out and still on userlog form. I say something is missing somewhere, may be close code or behaviour is not working. Pl help me to understand.. Thanks

    Dear Healdem, you are talking of some risk.. i am not understanding.. pl tell me which is good one...access function current user? what it is?

  5. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by putur View Post

    ...I say something is missing somewhere...Pl help me to understand...
    Not sure how we can help you, there, since neither of us can reproduce the problem! I suppose it might be a network thing, but there's no real way for us, working 'long distance,' as it were, to help you with this kind of problem.

    Quote Originally Posted by putur View Post

    ...Healdem, you are talking of some risk.. i am not understanding...
    When healdem wrote

    ...you are taking one heck of a risk using forms that you have found elsewhere and not understand what is going on...

    I believe he was referring to the practice of downloading code from the web and using it without bothering to figure out how, exactly, it works. There's nothing wrong with 'borrowing code,' and using it, but it is really important for one who is doing this to take the time to understand how the borrowed code does what it does; otherwise it is possible for unexpected things to occur, and debugging code that you have no understanding of is almost impossible.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •