Help with recordsets

Adzi

Registered User.
Local time
Today, 10:04
Joined
Jan 13, 2007
Messages
37
Hi,

I'm a bit useless with recordsets so any help would be greatly appreciated.

I've developed a system where the user books in a campsite reservation. A booking reference is generated by taking the last reference in the table and adding 1 to it to form the following "cmp-bca####". This is all contained in a public function.

There is a field on the booking form that is used for number of units, so if the user books in three units, three seperate records, with three booking references should be created. Is the best way to replicate this data to use recordsets or is there a better way?

Can someone help me with the algorithm for this record set?

Thanks,
Adzi
 
A recordset would be one way, and probably what I would do. Search on DAO recordset and AddNew, which would be the method used. You would enclose that in a For/Next loop using your number of units field for the upper boundary.
 

Users who are viewing this thread

Back
Top Bottom