I’m starting to complete the design of a new database. Recently I was told if I’m going to be archiving I shouldn’t be using autonumbers. So I have since changed the autonumbers to number long integers. My questions are:
1)Where do I put the code to generate the next autonumber when a new record is entered?
I have tried placing this: =DMax(“tblPatient”, “PatientID”)+1 in the Default value under PatientID in table design view but get an error. I guess you can’t use DMax for Default value in table properties?
Or should I just place that code under the field’s default value in form design and also in the forms before update. If so do I leave the PatientID’s default value property in the table to default to zero?
2)If I can’t set the autonumbers to increment myself in the table properties, when I start to archive and restore archived records by the use of Append queries how will the autonumbers be generated if the code for them is only in the forms?
I have searched everywhere for examples but only found a couple very vague answers. Would appreciate any incite or a kick in the right direction of some past threads.
Thank you
Jols