Home » Developer & Programmer » Forms » Achieving last record message in correct place
Achieving last record message in correct place [message #137780] Fri, 16 September 2005 14:45 Go to next message
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 Go to previous messageGo to next message
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

Re: Achieving last record message in correct place [message #138233 is a reply to message #137915] Tue, 20 September 2005 17:11 Go to previous message
Colm
Messages: 22
Registered: June 2005
Junior Member
Ok tried the next-record check after and that's what I was missing.

Thanks
Previous Topic: Can Any Have the Urdu font for developer 2000?
Next Topic: How to order table ABC based on the fields in table XYZ
Goto Forum:
  


Current Time: Thu Sep 19 22:39:22 CDT 2024