Don't know if this is of use to anyone... It's a master-detail form with syncing - I intended to do a full CRUD (Create, Read, Update, Delete), but I'm afraid I didn't get any further than read.
To run, alter the paths in the dsn file and at the beginning of the script to point to your own directories etc...
Might be a useful example or maybe someone might want to continue with it...
Melanie
PS. Just remembered, I based it on Scriptdbexample3 from the database tutorials on this site - but I found a fencepost error in the original script -
Quote:
function Next()
{
var num_records = records.GetNumberOfRecords();
if (Start_Record_Num + 5 < num_records) { // Check there are 5 more records
Start_Record_Num += 5;
}
ShowRecords();
My version is:-
Quote:
function nextEmps()
{
// var Numberofemps = Remp.GetNumberOfRecords();
if (Emppointer + 5 <= Numberofemps) { // Check there are more records - Emppointer + 4 are currently showing
Emppointer += 5;
} else {
empinfotext.SetSelection(0,-1);
empinfotext.ReplaceSelection("At last employee for this department");
wait(2);
empinfotext.SetSelection(0,-1);
empinfotext.ReplaceSelection("");
}
showEmps();
The bit I'm talking about is "Start_Record_Num + 5 < num_records" which generates a fencepost error if you have 6 records (1 more than the pagination). Mine uses less than or equal to "Emppointer + 5 <= Numberofemps". Perhaps somebody can doublecheck this?
Apologies if any of this has been covered before and I'm duplicating effort - I haven't caught up with all the posts since I've been away.
Best wishes,
Melanie