` Printed Icetips Article

Icetips Article



ABC: Delaying the PrimeAutoInc method
1998-07-10 -- Nik Johnson
 
Newsgroups: topspeed.products.c4

> I want to delay the PrimeAutoInc method in a form. This method must be
> called just before insertion. A part of the autoinc key is user
> dependent.

You need to modify the .Ask method for the browse. Copy the code for
BrowseClass.Ask from ABBROWSE.CLW and modify it to eliminate
SELF.PrimeRecord. This will kill the autoincrementing.

If you want to do this often, you may want to derive your own
BrowseClass, adding a switch for killing the autoincrement.

When you go to save the record, the .Insert method for the file manager
should detect that autoincrementing (a) is required and (b) has not been
done. It will then autoincrement without losing your entered data.



Printed November 23, 2024, 2:03 am
This article has been viewed/printed 35376 times.
Google search has resulted in 9 hits on this article since January 25, 2004.