View Full Version : help needed with text Primary key


mack
11-30-2009, 02:28 AM
Hello everyone, I'm new and I'm writing from Itlay (sorry for my english)
I'm working on a MS Access Db built by another person.
This Db has all the tables' primary keys set with simple text fields (and not with autoincrement values).
To add a new record I know that previously it was used a function (or something similar). This method consisted (more or less) in reading automatically the last Id number, increment 1 and write it in the new record's field.
Did anyone ever faced something like this before? Can I do something similar? (maybe with a query?)
Any suggestion will be very appreciated.....
Marco

gemma-the-husky
11-30-2009, 05:21 AM
this is normal

except that you cant add 1 to a TEXT field directly - which is why indexes are normally based on numeric fields - which are more efficient for the processor than text fields, anyway.