*** ActiveX Control Event *** LPARAMETERS statuscode, param do case case StatusCode = 1 * start debugo "code 1 - start" do case case thisform.opgDirection.value = "Copy PC to HH" debugo "code 1 - copying PC down to HH: SFDEMO1.DBF" This.CopyTableToPalmPilot(fullpath("sfdemo1.dbf")) debugo "code 1 - copying PC down to HH: SFDEMO2.DBF" This.CopyTableToPalmPilot(fullpath("sfdemo2.dbf")) case thisform.opgDirection.value = "Copy HH to PC" debugo "code 1 - copying HH up to PC: SFDemo1.DBF" this.GetTableFromPalmPilot(fullpath("sfdemo1.dbf")) debugo "code 1 - copying HH up to PC: SFDemo2.DBF" this.GetTableFromPalmPilot(fullpath("sfdemo2.dbf")) othe messagebox("What is the value of opgDirection? " + tran(thisform.opgDirection.value)) endcase case StatusCode = 3 * running debugo "code 3 - running. CmdType is: " + tran(this.CmdType) do case case thisform.nCounter = 1 debugo "code 3 - running. Counter = 1. Do function for SFDemo1" case thisform.nCounter = 2 debugo "code 3 - running. Counter = 2. Do a different function for SFDemo2" othe endcase thisform.nCounter = thisform.nCounter + 1 case StatusCode = 2 * end debugo "code 2 - end" othe debugo "code ? - otherwise: " + tran(StatusCode) endcase