>if (DmNumRecords(PocketEtcDB) > 0)
> {
> CurrentRecord = DmNumRecords(PocketEtcDB);
> index = CurrentRecord - 1;
> } else { index = 0; }
>
...
> textHandle = DmNewRecord(PocketEtcDB, &index, recordLength);
index should ALWAYS be "CurrentRecord", not CurrentRecord-1, since the
existing records are numbered 0 through CurrentRecord-1 so assuming you
want to add one at the end, use CurrentRecord. This code adds a record at
the penultimate position, which isn't what you want.
Steve Patt
President, Stevens Creek Software
http://www.stevenscreek.com/pilot
The home of...
PalmPrint && UnDupe && AreaCoder && Handy Randy
Athlete's Calculator && PocketTimer && SnailMailer
Athlete's Diary && On Hand && Take An Order! && many more