Board index » delphi » Help:Custom Auto Number a field in a Access Data Base

Help:Custom Auto Number a field in a Access Data Base

Hi

I am using Delphi 1 with an Access Database.

I have a form with a couple of DBEdit Fields and a DB Navigator.

What I want is to AutoNumber the Key Field, ie when adding a record, it must
look for the last number used and add 1.  The key Field is of type string
but contains only numerics, hence the ability to add 1.

The problem is that the user must not be able to click on the field, so I
can't make it a read-only DBEdit.  If I make it a DBText, I cannot change
the value.

How do I do this?

Any help or pointers to where I can get help will be appreciated.

Please follow up to this group.  If you email, do not forget to remove the
".NOSPAM" from my address on the reply.

Regards
Keith

--
Keith Prins - kpr...@iafrica.nospam.com {remove .nospam for my address}

 

Re:Help:Custom Auto Number a field in a Access Data Base


Hi

I did not see this appear, so I am reposting it.  Sorry if you have read
this before.

I am using Delphi 1 with an Access Database.

I have a form with a couple of DBEdit Fields and a DB Navigator.

What I want is to AutoNumber the Key Field, ie when adding a record, it must
look for the last number used and add 1.  The key Field is of type string
but contains only numerics, hence the ability to add 1.

The problem is that the user must not be able to click on the field, so I
can't make it a read-only DBEdit.  If I make it a DBText, I cannot change
the value.

How do I do this?

Any help or pointers to where I can get help will be appreciated.

Please follow up to this group.  If you email, do not forget to remove the
".NOSPAM" from my address on the reply.

Regards
Keith

--
Keith Prins - kpr...@iafrica.nospam.com {remove .nospam for my address}

Other Threads