I’m using the FoxPro 2.6 EDIT command (similar to BROWSE) to show a number of records in a window:
SELECT "qulines"
SET ORDER TO qutime
EDIT FIELDS ;
client_1 = qutime + "|" + quref_x:70:H="":W=p_exclude(), ;
client_2 = qutype + SPACE(1) + qucon + "|" ;
+ qupet_x + "|" + qursn_x:70:H="":W=p_exclude() ;
FOR p_quseq = quseq ;
NOAPPEND ;
NODELETE ;
NOMENU ;
TITLE " " ;
WINDOW qumast ;
COLOR SCHEME 10
which limits the records shown by comparison of a memory variable (p_quseq) and a field in the table (quseq).
I also make use of:
ON KEY LABEL RIGHTARROW DO p_change WITH "+"
ON KEY LABEL LEFTARROW DO p_change WITH "+"
ON KEY LABEL HOMEARROW DO p_change WITH "="
which links to:
PROCEDURE p_change
PARAMETER w_quparm
IF w_quparm = "+"
p_quseq = p_quseq + 1
ENDIF
IF w_quparm = "-"
p_quseq = p_quseq - 1
ENDIF
IF w_quparm = "="
p_quseq = DATE()
ENDIF
SELECT "qulines"
LOCATE FOR quseq = p_quseq
RETURN
Moving around (backwards, forwards, returning to today) works UNTIL I hit a day with no records to show.
When that happens, I get a blank list – which I expect.
What I didn’t expect is that if I move to a list that should have records to display, I still get a blank list.
For example, when I start, suppose I have 6 records to show for the initial value of p_quseq and move forwards by one day using the right-arrow key to a day with NO records to show, I get a blank list - expected. If I then move back to the previous day, I still see no records – although I know there a six matching records in the table.
My question is how do I overcome this?
SELECT "qulines"
SET ORDER TO qutime
EDIT FIELDS ;
client_1 = qutime + "|" + quref_x:70:H="":W=p_exclude(), ;
client_2 = qutype + SPACE(1) + qucon + "|" ;
+ qupet_x + "|" + qursn_x:70:H="":W=p_exclude() ;
FOR p_quseq = quseq ;
NOAPPEND ;
NODELETE ;
NOMENU ;
TITLE " " ;
WINDOW qumast ;
COLOR SCHEME 10
which limits the records shown by comparison of a memory variable (p_quseq) and a field in the table (quseq).
I also make use of:
ON KEY LABEL RIGHTARROW DO p_change WITH "+"
ON KEY LABEL LEFTARROW DO p_change WITH "+"
ON KEY LABEL HOMEARROW DO p_change WITH "="
which links to:
PROCEDURE p_change
PARAMETER w_quparm
IF w_quparm = "+"
p_quseq = p_quseq + 1
ENDIF
IF w_quparm = "-"
p_quseq = p_quseq - 1
ENDIF
IF w_quparm = "="
p_quseq = DATE()
ENDIF
SELECT "qulines"
LOCATE FOR quseq = p_quseq
RETURN
Moving around (backwards, forwards, returning to today) works UNTIL I hit a day with no records to show.
When that happens, I get a blank list – which I expect.
What I didn’t expect is that if I move to a list that should have records to display, I still get a blank list.
For example, when I start, suppose I have 6 records to show for the initial value of p_quseq and move forwards by one day using the right-arrow key to a day with NO records to show, I get a blank list - expected. If I then move back to the previous day, I still see no records – although I know there a six matching records in the table.
My question is how do I overcome this?