>Is there a way i can open a file and allow changes but disallow append.
>
>something like this
>select 1
>use myfile1 index name (noappend)
>sele 2
>use myfile2 index name2 (noappend)
>
>i am aware that the noappend works with browse
>but is there code that can be used when iniatilly opening a file that will have the same affect as noappend
>(and allow changes to existing records)
>
Hi Karen -
You can perhaps use an Insert Trigger that returns either .T. or .F. depending on your condition.
On the other hand, I wonder what your conditions are - wouldn't it be as easy as displaying thedesired alias(es) inside Grid(s) with .AllowAddNew=.F. (default and then disabling a "cmdNew" button if any?
(As for your code: better do something like
Use yourTable Shared In 0
rather than using hard-coded workareas by doing a Select 1,2,3 beforehand.
And if you are using standard compound CDX index files (recommended), you do not need the Index clause.)
hth
-Stefan