Recordset question

pb21

Registered User.
Local time
Today, 23:05
Joined
Nov 2, 2004
Messages
122
I have a recordset that I want to add a new field to, in this case to create a random double number against each row in the recordset. can i do this without making a table or do I have to make an action query in vba and then add the field data using the recordset.

hope i have explained my self well.

the ultimate goal is to sort the recordset based on the double numbers to get a random selection.

I had hoped to avoid creating tables as this will create more network traffic to the back end.

regards

Peter
 
Could you...

Create a random number generator in a Public Function GetRandom() as Long, say, in a standard module.
Then open a recordset on "SELECT ExistingField1, GetRandom() as NewField FROM ExistingTable WHERE SomeCondition;"
 

Users who are viewing this thread

Back
Top Bottom