wood burning stoves 2.0*
The moose likes General Computing and the fly likes Rand a floating number in MS Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Rand a floating number in MS Access" Watch "Rand a floating number in MS Access" New topic
Author

Rand a floating number in MS Access

Elahe Shafie
Ranch Hand

Joined: Dec 12, 2001
Posts: 291
Hi Friends,
Does any body know how can I Rand a number in MS Access?
Thanks,
Elahe :roll:
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

You can make an AutoNumber field produce a random number (in design view, select the row, and make the type 'AutoNumber' and at the bottom, select 'New Values = Random'

If it *must* be a float, or if you're wanting a number at some other time than row insertion, you could use VBA to produce a random number. It's been too long since I worked in VBA, so I can't help you with that code, but I know it's possible. Add a new module, and hope that your Access install has the VBA help files installed, if you're not sure of VB yourself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Rand a floating number in MS Access
 
Similar Threads
JDBC & SQL Error List Help
Random insert and delete into an arraylist
How to get next available number from MS access
WA #1.....word association
database in netbeans