Re: filemakerpro, go to the next record
Re: filemakerpro, go to the next record
- Subject: Re: filemakerpro, go to the next record
- From: "Manfred M.Strasser" <email@hidden>
- Date: Sat, 10 Dec 2005 20:09:43 +0100
Am 09.12.2005 um 15:15 schrieb Francesca P:
How can I tell to filemaker to go to the next, or previous record??
try this ...
tell application "FileMaker Pro"
set myDatabase to the name of window 1
set myCount to the count of records of document myDatabase
--myCount = the number of records being browsed
if myCount > 1 then
set myRecordID to the ID of current record as integer
--"as integer" is very important !!
--"to the ID of curren record" -> returns 1.2599066E+7
--"to the ID of curren record as integer" -> returns 12599066
--FileMaker cann't go to the record ID 1.2599066E+7
set nextRecordID to myRecordID + 1
try
go to record ID nextRecordID of document myDatabase
on error errmsg number errnum
display dialog (errmsg & " Nr. " & (errnum as string)) & return &
"You have reached the last record." buttons {"OK"} default button 1
with icon 0
end try
else
display dialog "The count of current records is 1 and 1 is less
then 2. Therefore \"go to next record\" is not possible." buttons
{"OK"} default button 1 with icon 0
end if
end tell
br
Manfred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden