Results 1 to 2 of 2
  1. #1
    Join Date
    May 2017
    Posts
    1

    Unanswered: Password generated on got focus

    Hi.

    I'm recent to access.
    I am building a password table where i issue a number of passw per user each for different purposes.
    I wanted the password field to automaticaly generate a string of random "A to Z a to z and 123456789" when the field got focus.
    I have code to generating a string but cant get it to work when loading the form and adding data to the fields.

    any help on this please.
    greetings from Portugal.
    AlipioSequeira

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,482
    Provided Answers: 11
    Let See what you have done so far

    you code should be in the form_load bit of the form

    then me.feildname.SetFocus will SetFocus to said feild

    But I guessing you want the curosr at the End

    that needs a bit more thinking

    PassLenght = len(me.thefeildname)

    off top of head haven't done this for Years

    me.thefeildname.selstart = PassLenght
    hope this help

    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
    DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
    THEY'RE BEHIND YOU FOR A REASON

Posting Permissions

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