Dec 12, 2002 #1 jontheduke IS-IT--Management Joined Nov 26, 2002 Messages 1 Location US I am trying to generate a random number and then make a table with just that number.
Dec 12, 2002 #2 AmiDenise Programmer Joined Aug 23, 2001 Messages 15 Location US Hi Jon! Access has a function to generate a random number. It's "rnd". Information on it can be found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vafctRnd.asp To insert your randomly selected number into a new table, use the following sql statement in a query or procedure: Code: SELECT Rnd() AS Random_Number INTO tblRandom; This page has sample code to randomly select records from a table: http://www.fontstuff.com/vba/vbatut02.htm Hope this helps! Good Luck! Ami D. Shroyer, MCP amidenise@yahoo.com http://www.amidenise.com Upvote 0 Downvote
Hi Jon! Access has a function to generate a random number. It's "rnd". Information on it can be found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vafctRnd.asp To insert your randomly selected number into a new table, use the following sql statement in a query or procedure: Code: SELECT Rnd() AS Random_Number INTO tblRandom; This page has sample code to randomly select records from a table: http://www.fontstuff.com/vba/vbatut02.htm Hope this helps! Good Luck! Ami D. Shroyer, MCP amidenise@yahoo.com http://www.amidenise.com