Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table Auto Fill
Message
From
04/01/2006 08:30:39
 
 
To
04/01/2006 05:29:12
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01083029
Message ID:
01083086
Views:
11
>Dear Experts
>
>I want to fill table with blank records, with 10 records division, such as
>
>If Table has 0 records then 10 blank recods should automatically appended
>If Table has 6 records then 4 blank recods should automatically appended
>If Table has 12 records then 8 blank recods should automatically appended
>If Table has 37 records then 3 blank recods should automatically appended
>And so on…….
>
>Please help
PRIVATE j
FOR j=RECCOUNT()%10 to 9
   APPEND BLANK
NEXT
RELEASE j

or 
Attention, this doesn't apply the cursor DEFAULT expressions ( a bug for me )

LOCAL ARRAY DUMMY[10-RECCOUNT()%10,1]
APPEND FROM ARRAY DUMMY FIELDS EXCEPT '*'
RELEASE DUMMY
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform