Need to set a job number to a unique number, based of creating a number using the RandRange function, but then I need to take that number and bounce it off two access tables (called openjobs & closejobs) to see if that random number is already used, then loop back if it is to start over, but if it isn't, then use it to create a new record in openjobs table.
What I don't know how to do is the loop structure if the number already exists on one of the two tables. Could someone direct me in how the code would look starting with this CFSET statement? <CFSET job_number = RandRange(1, 100000)> ...and as always, thanks in advance! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

