Re: I need to generate a 8 digit Random Number in a Query



lol, no your not dense.
The Main database is part of a Web Application (inventory related) which has
a GUI for entering orders manually - 1 by 1.
When done manually - 2 things besides the info manually enter happens.
1. A Request Number is entered. (Auto-number field) starting @ 1 - currently
below 300.
2. An activation code is created for the user to activate the device.

My problem is I have 1200 people I need to Bulk Load. The backend DB is an
MDB file which we can open/manipulate with Access. We copied the "Requests"
table into our seperate Bulk Load database. Then we created a query which
populates all the fields manually entered in the GUI. Well a bug not
mentioned in the vendors white papers - is that when you Bulk Load, (instead
of the manual GUI order entry) the Authorization code (8 digit numeric) is
not auto generated - that we will have to generate it manually. I was hoping
to find some sort of method within Access to do this. If it turns our to be a
nightmare, I'll just add 23456789 to the request number.

I was hoping to find a random number however, since the "device" serial
number are already sequential - I didn't want the activation codes to be also.

Don




"Jeff Boyce" wrote:

I guess I still am dense. If you already have an Autonumber ([Request
Number]) that you could use as your "Activation Code", why not use it?

Regards

Jeff Boyce
Microsoft Office/Access MVP


"dferris@xxxxxxxxxxxxxxx" <dferriscablevisioncom@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote in message news:80474814-E791-4A3B-B394-0ABBE1C1D8D5@xxxxxxxxxxxxxxxx
Jeff,
Hey thanks for your answer. Sadly I already need an auto-number field for
Request Number - and access will only let me use 1 autonumber field per
table. I need an expression or formula I can drop into a query that will
create this munber.

"Jeff Boyce" wrote:

You need a unique number. Does it have to be random? If the user never
sees the database, only his/her own Activation Code, could you just use
an
Autonumber field?

Regards

Jeff Boyce
Microsoft Office/Access MVP


"dferris@xxxxxxxxxxxxxxx"
<dferris@xxxxxxxxxxxxxxx@discussions.microsoft.com> wrote in message
news:FE6C301D-A745-4048-9CAD-D0BB54C95647@xxxxxxxxxxxxxxxx
Hi,
I need to generate an 8 digit numeric "Activation Code" for a project I
am
working on. I need this to be unique and random - but I need it auto
generated.
I don't care if it auto populates from a Field Property in the Table -
or
if
an Expression in a Query populates the field.






.



Relevant Pages

  • Re: Complex Windows Applications in C# -- how high is the bar?
    ... child windows containing various Windows controls, ... application in order to stretch it to handle an enitrely new database ... concern is the GUI -- this is a very complex application in terms of its ... There's nothing wrong with letting the complex GUI stuff remain in the hands of Win32 code and use managed code for the database access, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: porting curses driven to gui application
    ... > more than just replace the curses interface by a GUI. ... > don't have a X server (e.g. because they are just running Windows ... > running on the machine where the database is also running. ... > server and the client on the user side. ...
    (comp.unix.programmer)
  • Re: Advice on Architecture
    ... abstraction from the database. ... My recommendation: for all your lookup data: ... You can simply store the array of DataRow objects and pass it ... If you are going to make a connection, get data, fill some GUI, and not ...
    (microsoft.public.dotnet.general)
  • Re: Data access from multiple code modules
    ... The GUI has to be able to acces the data object, ... GUI code from the code operating on data, ... One way would be to use the database as the point of contact for all ... instantiates an object to interact with the database and performs ...
    (comp.lang.python)
  • Re: Linux alternative to m$ abscess?
    ... I see the advantages of a CLI for some things, and a GUI for others. ... Now I had a lot of database experience (I even ... When I upgraded from Red Hat Linux 5.0 to RHL 6.0, Informix ...
    (comp.os.linux.misc)