Hale, Jim
Jim.Hale at FleetPride.com
Tue Apr 26 17:05:59 CDT 2005
Using a static function You could store the previous cycle number then call it when needed. Jim Hale Static Function CycleNo(Optional intData As Integer) As Integer Dim intCurrent As Integer If intData <> 0 Then intCurrent = intData CycleNo = intCurrent End Function -----Original Message----- From: Kaup, Chester A [mailto:kaupca at chevrontexaco.com] Sent: Tuesday, April 26, 2005 3:44 PM To: accessd at databaseadvisors.com Subject: [AccessD] Autonumber/autoincrement I have a database of oilfield injection wells. Periodically the wells are changed from injecting water to injecting CO2 or visa versa. The changes are independent from one well to the next. The records in the table have well name, cycle number, injection fluid type and date of change. I can build a form with drop down for well name and injection fluid type. I could also use a calendar control for the date. I would like the cycle number to fill in by itself based on the cycle number of the previous record for the well getting a new record. Can this be done using some kind of autoincrement? Chester Kaup Information Management Technician IT-MidContinent/MidContinent Business Unit CTN 8-687-7415 Outside 432-687-7415 No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com *********************************************************************** The information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error please contact the sender and delete the material from any computer. As a recipient of this email, you are responsible for screening its contents and the contents of any attachments for the presence of viruses. No liability is accepted for any damages caused by any virus transmitted by this email.