Gowey Mike W
Mike.W.Gowey at doc.state.or.us
Thu Sep 8 09:58:07 CDT 2005
Thanks Andy, that is exactly what I needed. Mike Gowey MCDST, A+, LME, NET+ Team Leader - East Region Information Systems Unit -----Original Message----- From: Andy Lacey [mailto:andy at minstersystems.co.uk] Sent: Thursday, September 08, 2005 8:42 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Autonumber Assigned Immediately Hi Mike As you've found out the autonumber only gets allocated when you begin to populate a record. Anything you do to override that is potentially going to give you problems when the user wants to cancel the creation of a record because the autonumber will still get used up. It also means in a multi-user situation that the next number will be got as you enter the screen not as you write the final record. But if that's not an issue for you, or you're prepared to deal with that then you could, for example, create a field on your table, leave it off the form then (or make it hidden) then in the OnCurrent have: If Me.NewRecord then me!fldDummy=1 'or whatever End if By forcing something into the record the autonumber will be got. But, as I say, make sure you've thought the implications through. -- Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Subject: [AccessD] Autonumber Assigned Immediately Date: 08/09/05 14:13 Could someone explain to me how to get a autonumber assigned to a record as soon as the form is opened for data input. Right now when I open the form it will not show me or assign an autonumber until I enter data in the first field. I want the number to be assigned and shown when the form opens. TIA for any help provided. Mike Gowey MCDST, A+, LME, NET+ Team Leader - East Region Information Systems Unit -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ________________________________________________ Message sent using UebiMiau 2.7.2 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com