Achieving last record message in correct place [message #137780] |
Fri, 16 September 2005 14:45 |
Colm
Messages: 22 Registered: June 2005
|
Junior Member |
|
|
Hello,
I have a further query to add to this. I have a porblem in a form I'm working on as follows:
I have a poplist and when I choose 'Forward' which is one of the values in the list, it performs
next_record;
This then allows me to keep choosing forward and moving along each record.
I want it to tell me me when I'm at the last record so I have the something like the following code:
If poplist_item='Forward'
then
next_record;
if system.last_record='true'
then
code for displaying message ('AT LAST RECORD');
end if;
end if;
If poplist_item='Back'
then
previous_record;
end if;
However, my message fires on entering the last record, when I really want it to display after I have viewed the last record
and have pressed forward again.
Can anyone suggest where I'm going wrong? I have this code in a when-list-changed trigger for the poplist item
Should I be using a loop instead?
I've seen the faq on iterating through the records but I'm currently not using a loop
Another issue is that when I have choose 'back',( which performs previous_record;)the value present in the poplist still shows
forward and I have not been able to change it
I hope someone can help.
Many thanks
Colm
|
|
|
Re: Achieving last record message in correct place [message #137915 is a reply to message #137780] |
Sun, 18 September 2005 19:31 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
For your first question, put the 'next_record' command AFTER the 'if last_record' test.
For your second question, I assume that you have a static list which contains 'forward', then 'back'. Define a second static list which has 'back', then 'forward', and when you 'go back', change the record_group being used by your list.
David
[Updated on: Tue, 20 September 2005 19:35] Report message to a moderator
|
|
|
|