ID and autonumber on form field

DevAccess

Registered User.
Local time
Today, 11:35
Joined
Jun 27, 2016
Messages
321
Hello

I have one field who creates ID ( autonumber field ) which has datasource to the query field autonumber in the table as well.

When we create new record it creates new id for example '45' , and we went away with form and decided not to save when we come to next time and create new records it gives 46 as new id even though we have not saved previous record.

Do we have to generate this record only while saving the form ??

any other suggestions would be highly appriciated.

Thanks
 
Autonumber is only used by MS-Access for an unique identification, it can even be lesser as 0.
If you want an ID-number, you've to create your own function, normally the Max function is used.
 
DevAccess,

This article on Autonumbers may be helpful.
 
Autonumber is only used by MS-Access for an unique identification, it can even be lesser as 0.
If you want an ID-number, you've to create your own function, normally the Max function is used.


Hi thanks for your reply now my query is that I want to generate the ID number from the above function code it is working fine but that works for me for new record is there in case of existing record how to implement changes control source changes to the field of query which retrives records of the record ID and when it is new it would use the fucntion above.

Many thanks
 

Users who are viewing this thread

Back
Top Bottom