>Part of your problem is that you should be appending records with a pre-determined key values using INSERT INTO and not APPEND. For example, say that your table has a primary index on a field CKEYFIELD, you would either get the next key value from your keyid table or use something like sys(2015) to generate a unique value. If you use the latter your "ADD" method would be something like...
>
>STORE SYS(2015) TO m.ckeyfield
>INSERT INTO yourview (ckeyfield) VALUES (m.ckeyfield)
>
>Then to save you issue a TABLEUPDATE command.
I don't want to store a random value to the key. I want to store the sequential key that goes in automatically when I do an APPEND BLANK. I can't do INSERT INTO because I'm not inserting anything into it. If I try it, it will put a 0 in for the key field and then I'll get a duplicate key error. That's why I use APPEND BLANK.
>If you get an error while developing the form, you need to issue a TABLEREVERT command. In the form.LOAD method, you might want to have something like...
>
>ON KEY LABEL F12 =TABLEREVERT(.T.,"locations_by_client_number")
I'll try this. Thanks.
-Michelle
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement