set deskTopPath to the path to the desktop as string
set startupDiskPath to the path to the startup disk as string
set CustImportFile to deskTopPath & "CustUpdate.tab"
set EmpImportFile to deskTopPath & "EmpUpdate.tab"
set oldCustImport to startupDiskPath & "CustInfo"
set oldEmpImport to startupDiskPath & "EmpInfo"
tell application "FileMaker Pro"
tell document "Customers Updater Accounting"
set CustText to cell "Global Export Holder Customers" of current record of current layout
set EmpText to cell "Global Export Holder Employees" of current record of current layout
end tell
end tell
tell application "Finder"
set CustImportFileSession to open for access CustImportFile with write permission
write CustText to CustImportFileSession
close access CustImportFileSession
set EmpImportFileSession to open for access EmpImportFile with write permission
write EmpText to EmpImportFileSession
close access EmpImportFileSession
end tell
tell application "AccountEdge NE"
set importLogCust to import cards of type customer from alias CustImportFile username "John Haley" password "ZERO23ZER" separated by tabs first record is data duplicates are update existing record identify by card id
set importLogEmp to import cards of type employee from alias EmpImportFile username "John Haley" password "ZERO23ZER" separated by tabs first record is data duplicates are update existing record identify by card id
end tell
tell application "Finder"
delete file CustImportFile
delete file EmpImportFile
delete file oldCustImport
delete file oldEmpImport
end tell
Any Help greatly appreciated,
John Haley