Re: creating random numbers

From: Kelvin (klu_at_klu.com)
Date: 02/26/04


Date: Thu, 26 Feb 2004 08:56:49 -0800

Do the passwords need to be unique to each other? If you just need a random
number, there is a random number generator that can be used. The problem is
that there is a chance (although slim) that this number may be repeated.
Since you are generating passwords that I assume are also linked to a user
ID, having repeated passwords might not be a problem. Would this work?

Kelvin

"Elisa" <eligalax@hotmail.com> wrote in message
news:81b1447e.0402260154.30df504f@posting.google.com...
> yes it works!
> but the new numbers it generates are also negative and are too big for
> the field. The field is for password, and should be more or less
> between 5 and 7 digit (10000 and 9999999.
> As for random autonumber field I cannot set neither the lenght nor the
> sign of the number, I was wondering if there is a routine in VBA for
> which I can:
> - set the field as "number", which is the primary key of the table
> - put in the predefined value a formula that creates random numbers
> (which I have)
> - create a routine in VBA that regenerates the number if the number
> generated already exists.
>
> I cannot write this routine, how can it be? Should I write it in the
> form, as an event?
>
>
>
> "Kelvin" <klu@klu.com> wrote in message
news:<#bTKSc9#DHA.792@TK2MSFTNGP11.phx.gbl>...
> > Create a new table with the same data structure (no data) as your
existing
> > table. Then change the data type of the field you want to autonumber
set to
> > random. Then create an append query that will every field (including
the
> > field that in an autonumber in the new table) to this new table. All
your
> > original random numbers will be preserved and new numbers will be
random.
> >
> > Kelvin
> >
> > "Elisa" <eligalax@hotmail.com> wrote in message
> > news:81b1447e.0402250055.482c0638@posting.google.com...
> > > The problem is that I already have an existing field, whose datatype
> > > is number, and it contains numbers I must preserve (It is a field for
> > > passwords and the passwords already assigned can't be changed), and
> > > access doesn't permit to change the datatype from number to
> > > autonumber.
> > > how can I do? Thanks
> > >
> > > Elisa
> > >
> > >
> > >
> > >
> > > "James Goodman" <james@norton-associates.REMOVE.co.uk> wrote in
message
> > news:<c1270f$bqr$1@titan.btinternet.com>...
> > > > You can use the Autonumber datatype, set to random to accomplish
this...
> > > >
> > > >
> > > >
> > > > --
> > > > James Goodman
> > > > MCSE MCDBA
> > > > http://www.angelfire.com/sports/f1pictures/
> > > > "Elisa" <eligalax@hotmail.com> wrote in message
> > > > news:81b1447e.0402190250.36106c70@posting.google.com...
> > > > > Hello everybody
> > > > > I am using microsoft access 2000, and I can't create in a form,
for a
> > > > > new record, a random number as predefined value which is different
> > > > > from all the random numbers already created for the existing
records
> > > > > (that means that if the formula generates a random number which
> > > > > already exists, it realise that this number already exists and
> > > > > regenerate another one)
> > > > >
> > > > > can anyone help me? thanks a lot
> > > > > Elisa



Relevant Pages

  • Re: creating random numbers
    ... As for random autonumber field I cannot set neither the lenght nor the ... create a routine in VBA that regenerates the number if the number ... >> The problem is that I already have an existing field, whose datatype ... >> passwords and the passwords already assigned can't be changed), ...
    (microsoft.public.access.forms)
  • Paper & pencil password algorithm
    ... rarely used there's no chance of me remembering the passwords between ... recalling them) based only on the account and/or website names, ... I have an idea that I could use a pseudo-random number generator to pick ... My private key would essentially be just a substitution cipher ...
    (sci.crypt)
  • Q: password generation
    ... I have been generating new passwords for my logins ... digit on the left page ... choosing whether to use a special character or a number based again on ... I thought of using a similar method to write a generator using a ...
    (sci.crypt)
  • Re: Paper & pencil password algorithm
    ... rarely used there's no chance of me remembering the passwords between ... recalling them) based only on the account and/or website names, ... I have an idea that I could use a pseudo-random number generator to pick ... My private key would essentially be just a substitution cipher ...
    (sci.crypt)
  • Re: Need Password Generator for 10 users
    ... Generator? ... apg, it's free and very nice, with a lot of options like ... That would depend on a) what you need to manage passwords for, ... what system you run on and c) exactly what you expect a password "manager" ...
    (comp.security.misc)