Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    30

    Unanswered: perfect previous button

    Hi,
    My form should display records, and I created 2 buttons, one of them should
    goes to the previous record, and I want this button goes to the last record
    when the current record is the first, well, I did the following:

    Code:
    IF not FORM_SUCCESS THEN
    	FOR I IN 1 .. SQL%ROWCOUNT LOOP
    		NEXT_RECORD;
    	END LOOP;
    ELSE
    		PREVIOUS_RECORD;
    END IF;
    but it didn't work, the same msg of "FRM-40100:At the first record" still shows up,
    so I changed the if condition as the following:

    Code:
    IF ERROR_CODE = 40100 THEN
    	FOR I IN 1 .. SQL%ROWCOUNT LOOP
    		NEXT_RECORD;
    	END LOOP;
    ELSE
    		PREVIOUS_RECORD;
    END IF;
    and still doesn't work,,

    Well, I tried to display the values of both SQL%ROWCOUNT and GET_BLOCK_PROPERTY('BOUQUETS',MAX_RECORDS_FETCHED) ,
    SQL%ROWCOUNT gives nothing, which I guess it means that it's not recognized in forms6i, MAX_RECORDS_FETCHED gives
    '0' always! even there're records displayed. (considering that I made the property of "Query all Records" = yes)
    I'm sure there's a way to get the number of records fetched like that showen at the status bar of the window.
    If anyone knows how I can get the number of records been fetched, PLZ advice me.
    thnx

  2. #2
    Join Date
    Jul 2004
    Posts
    30
    Sorry, the second code should be like follows:

    IF not FORM_SUCCESS THEN
    FOR I IN 1 .. GET_BLOCK_PROPERTY('BOUQUETS',MAX_RECORDS_FETCHED) LOOP
    NEXT_RECORD;
    END LOOP;
    ELSE
    PREVIOUS_RECORD;
    END IF;

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    setup your button this way.

    if :system.current_record = 1 then
    last_record;
    else
    previous_record;
    end if;
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •