FPW2.6/wfw3.11 - skip problem in get screen with browse window

FPW2.6/wfw3.11 - skip problem in get screen with browse window

Post by Mike Christenso » Thu, 05 Jun 1997 04:00:00



This is an update of the problem I posted earlier concerning SKIP 1 when in
the get screen of a pawn program that has a browse window of pawn item
records:

1.  At first it was just the first record that SKIP 1 wouldn't advance
from, but now several records keep the SKIP 1 command from going anywhere.
I can get to the next record with GOTO RECNO() + 1.  But there are times
when I have a tag set and the users need to be able to advance record to
record based on the tag.  GOTO RECNO() + 1 works on an as entered basis
only.

2.  Advancing through the table with SKIP or GOTO RECNO() + 1 does not
return EOF() true at the end of the table.

3.  I allow the users to view the parent pawn table in a browse window and
select the record they want to see next.  The browse window shows record
spaces where the child records are.  This is not accepatable as it is
confusing to the users who don't understand (and don't want to undertand)
what all those grey blank lines are in the browse listing (of the pawn
table not the pawn detail table).

The procedure I use to skip to the next record SELECTs the table and checks
for EOF() before executing the SKIP 1 command.  The whole application
starts with a foundation read and a menu bar.  I use the TIMEOUT option in
the read statements.  The pawn and pawnitem tables are in the same drive
and directory as the program.  I've tried DOing the program as a prg and
exe file.

I can duplicate the EOF() situation with a simple program as follows:

close all
clear all
select 0
use pawnitem
set order to tag pi_pa_id
select 0
use pawn
set relation to pa_id into pawnitem
set skip to pawnitem
on key label ctrl+pgdn do skipone in testpawn.prg
go top
do while !eof() or lastkey() <> 13
    *
enddo
pop key
return

Procedure skipone
if !eof()
skip 1
endif
wait window "pawn recno() = "+alltrim(str(recno()))
if eof()
wait window "eof()"
endif
return

I know I'm overlookng something really simple but I just can't put my
finger on it.  Any help would be greatly appreciated.

--
Mike Christenson,  SysAdmin
Kerrville Police Department

 
 
 

FPW2.6/wfw3.11 - skip problem in get screen with browse window

Post by Alexandre Pechtchans » Fri, 06 Jun 1997 04:00:00



[ Courtesy cc'ed through e-mail to the quoted author ]
(Please see notes interspersed in the text)

Quote:>This is an update of the problem I posted earlier concerning SKIP 1 when in
>the get screen of a pawn program that has a browse window of pawn item
>records:

>1.  At first it was just the first record that SKIP 1 wouldn't advance
>from, but now several records keep the SKIP 1 command from going anywhere.
>I can get to the next record with GOTO RECNO() + 1.  But there are times
>when I have a tag set and the users need to be able to advance record to
>record based on the tag.  GOTO RECNO() + 1 works on an as entered basis
>only.

>2.  Advancing through the table with SKIP or GOTO RECNO() + 1 does not
>return EOF() true at the end of the table.

>3.  I allow the users to view the parent pawn table in a browse window and
>select the record they want to see next.  The browse window shows record
>spaces where the child records are.  This is not accepatable as it is
>confusing to the users who don't understand (and don't want to undertand)
>what all those grey blank lines are in the browse listing (of the pawn
>table not the pawn detail table).

>The procedure I use to skip to the next record SELECTs the table and checks
>for EOF() before executing the SKIP 1 command.  The whole application
>starts with a foundation read and a menu bar.  I use the TIMEOUT option in
>the read statements.  The pawn and pawnitem tables are in the same drive
>and directory as the program.  I've tried DOing the program as a prg and
>exe file.

>I can duplicate the EOF() situation with a simple program as follows:

>close all
>clear all
>select 0
>use pawnitem
>set order to tag pi_pa_id
>select 0
>use pawn
>set relation to pa_id into pawnitem
>set skip to pawnitem

****** NB: this is the key ********

- Show quoted text -

Quote:>on key label ctrl+pgdn do skipone in testpawn.prg
>go top
>do while !eof() or lastkey() <> 13
>    *
>enddo
>pop key
>return

>Procedure skipone
>if !eof()
>skip 1
>endif
>wait window "pawn recno() = "+alltrim(str(recno()))
>if eof()
>wait window "eof()"
>endif
>return

>I know I'm overlookng something really simple but I just can't put my
>finger on it.  Any help would be greatly appreciated.

I think you're overlooking that you SET SKIP to child table
(pawnitem), so skip 1 command will stay on the same record of parent
table (pawn) until all of the child records related to the current
parent record are exhausted.

[ When replying, remove *'s from address ]
Alexandre Pechtchanski, Systems Manager, RUH, NY

 
 
 

FPW2.6/wfw3.11 - skip problem in get screen with browse window

Post by Mike Christenso » Fri, 06 Jun 1997 04:00:00


I discovered the solution of eliminating the SKIP TO
command this morning after a good night's sleep.
Everything works like a champ with that little booger gone.
 I knew it had to be something simple.  I wish when
Microsoft publishes a solution they would give a little
more detail about why they include some of the commands.
Dumb me, I was in hurry and having enough problems just
getting a browse window to work with a get screen with
controls buttons, so I just copied everything they had and
went merrily on my way.  The sad part is that I spent hours
figuring out kludges to get around a problem that could
have easily been avoided - oh well, haste makes waste.
(kludges worked pretty good too ;-)

Thanks to all for your concern and responses.  I really
appreciate the support!

--
Mike Christenson,  SysAdmin
Kerrville Police Department

 
 
 

1. FPW2.6/WFW3.11/Novell SFTIII 3.11 - skip problem in get screen with browse

I have created a get screen which contains a master pawn record from a
table named "pawn".  I have a browse window that contains a detail listing
of the items pawned from a table named "pawnitem".  The tables are related
via a primary key value in the pawn table.  The master pawn screen defines
a large blank window, a window for the master pawn gets screen within the
large window, and a window for the browse within the large window.
Everything works fine except that if the master pawn table is at the first
record the SKIP command will not advance the pointer to the next record.
If the current record pointer is on any record but the first, SKIP works
fine.  SKIP -1 works fine anywhere.  GO TOP works fine.  GO BOTTOM works
fine.  Anybody got any clues?
--
Mike Christenson,  SysAdmin
Kerrville Police Department

2. FMP Web with NT

3. FPW2.6/WFW3.11/NT4.0/SQL Server - ODBC Problem

4. Trapping error inside stored procedure using ON EXCEPTION

5. HELP: Delphi 1.0 Running Under WFW3.11 Problem

6. how to parse a varchar for data to left and right of period

7. Help me: Problem Win95 x WfW3.11 with paradox databases

8. three data controls (updating one from another)

9. Problems using two printers under PDOXWIN5.0 and WFW3.11

10. FPW2.6: Entry screen with BROWSE?

11. Browse Screen Flicker FPW2.6a

12. Help: Browse window in screen-gen window??

13. Access in WFW3.11 and Novell