Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2007
    Posts
    91

    Unanswered: Login data not being displayed on the other forms

    I'm trying to display the logged in user in each and every 1 of my screens but my prog keeps crashin, claiming that it doesn't know d form am referencing (even though d form does exist) MAybe am doin somethin wrong... pls help

    My code:

    Me.Text88 = [Forms]![login]![txtUserName]

    Could it have anything to do with the fact that i've set the data entry property to no so that it can only display the searched results???

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    This is a baddd way of applying security.
    For this to work you'll need your login form to always be open with txtUserName populated!

    I assume you have a users table? I suggest (if this is a small project) that you create a global variable and pass the username into that. You can recall the global variable at any point throughout.

    Make sure you clear it if the user logs out (or just quits the system)
    George
    Home | Blog

  3. #3
    Join Date
    Mar 2007
    Posts
    91
    Ok thanks, i'll try dat...Maybe it's coz as soon as the user logged on i closed d form...

  4. #4
    Join Date
    Mar 2007
    Posts
    91
    Thanks GeorgeV

    I've left ma login form openned and now it's workin perfectly fine

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    far smarter to take the network userid from an API call.. why you may ask?
    its a lot harder to fake..
    its available gratis so the user doesn't have to re-authenticate on each and every application...
    it can be used to seamlessly integrate with other applications, or is you move to a server backend

    Persoanlly I've always found Dev Asish's stuff pretty good.. do a google on Dev Ashish API


    PK Stormy has some good ideas here.. there may even be some code in the code bank. its a shame the search facility is pants, otherwise I know there are plenty of examples of pulling in the network logon id as part of the access thread.
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    you could always close the form after you've looked up the value?
    Just a suggestion.
    Either way, your security needs a rethink.

    Have you blocked SQL injection yet (that's worth a few extra marks for sure...)
    George
    Home | Blog

Posting Permissions

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