kafka1 wrote:
I have created a table containing my music collection by importing an Excel
Spreadsheet. After a lot of trial and error, almost everything is working
fine, however when I create a new record I have to manually enter a number
in the ID (Primary key) field. This is a bit of a nuisance as it means I
have to determine the ID number of the last record. I have done what has
been suggested in another forum, i.e. set the AutoValue for ID to Yes,
however all that happens that a zero is placed in the ID field. It was also
suggested that I set the Auto-increment statement to IDENTITY, however I
don't have that option in Field properties.

I have also typed ALTER TABLE "Table1" ALTER COLUMN "ID" IDENTITY in the SQL
window, but without success. Is there any other way I can have the ID
automatically insert the next number?
I've had the best luck with this kind of thing by defining a new table with all the fields as needed, including an auto-increment primary key field, and then appending the data from the existing table (leaving out the manually generated key). After that, the original table can be discarded, and new records get the right key automatically. Even when I'm working inside a query that is a subset of the data and not sorted by the key; I can go to the last record and add a record, and it uses the next available record number for the table.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to