Hi Rosana:
The basic problem is using a transaction date as a primary key. What happens if more than one transaction occurs on the same date?
Any time you attempt to enter the same primary key into a record more than one time, the "uniquenes violation" error occurs -- VFP does not care than one of the records is deleted.
The generally recommended practice is to not use a meaningful field as the primary key -- but to use a code-generated key in a field that the user cannot access. This prevents the user to generating an uniqueness violation.
If you must use the transaction date as the primary key, the code so that the user cannot enter a second trasaction with the same date. If the user has deleted a transaction, code so that the deleted transaction is recalled rather than a new transaction with the same date inserted.
Otherwise, I think the uniqueness violation error is going to be a contiuing headache for you.
regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.comNo trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.