I guess, that I am little behind on the filter command.

Would it be similar to this?

In RRBYW7

>From the R> type
 select average(custid) into vCustId indicator viCustid from customer

create temp view tvCustomer
(CustID,Company,CustAddress,CustCity,CustState,CustZip,CustPhone,ModLeve
l,LastUpdateDate,LastUpdateTime,LastOrderDate,CustURL,CustEMail,CustStat
us,PaymentTerm,CreditLimit) as select
CustID,Company,CustAddress,CustCity,CustState,CustZip,CustPhone,ModLevel
,LastUpdateDate,LastUpdateTime,LastOrderDate,CustURL,CustEMail,CustStatu
s,PaymentTerm,CreditLimit  from Customer where 
custid = .vcustid


>From the Database explorer copy the form Customers to Customers2 and
change the base table to tvCustomer

In the On Row Exit eep type
SET VAR vButton INTEGER

  SET V vlastkey = (LASTKEY(0))
  IF vlastkey NOT IN ('[f7]','[f8]','[f2]') THEN
    SET V VLASTKEY = 'X'
  ENDIF

  IF vlastkey NOT IN ('[f7]','[f8]')THEN
    GOTO bottom
  ENDIF

  IF vbutton = 7 OR vlastkey = '[f7]' THEN
    -- SET V vnextprecno = (.vnextprecno - 1)
    SET VAR vCustID = (.vCustID - 1)
  ENDIF

  IF vbutton = 8 OR vlastkey = '[f8]' THEN
    --  SET V vnextprecno = (.vnextprecno + 1)
    SET VAR vCustID = (.vCustID + 1)
  ENDIF

  SELECT COUNT (*) +
   INTO vCount +
   INDICATOR viCount +
   FROM SYS_TABLES +
   WHERE SYS_TABLE_NAME = 'tvCustomer'

  IF vCount > 0 THEN
    DROP VIEW tvCustomer
  ENDIF --vCount > 0

  CREATE TEMP VIEW tvCustomer (CustID, Company, CustAddress, CustCity, +
   CustState, CustZip, CustPhone, ModLevel, LastUpdateDate,
LastUpdateTime, +
   LastOrderDate, CustURL, CustEMail, CustStatus, PaymentTerm,
CreditLimit) +
   AS SELECT CustID, Company, CustAddress, CustCity, CustState, CustZip,
+
   CustPhone, ModLevel, LastUpdateDate, LastUpdateTime, LastOrderDate, +
   CustURL, CustEMail, CustStatus, PaymentTerm, CreditLimit  +
   FROM Customer +
   WHERE CustID = .vCustID

  PROPERTY TABLE tvCustomer 'Refresh'

LABEL Bottom
  RETURN


Edit using Customers2 with no where clause and press [F7] or [F8]




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence
Lustig
Posted At: Thursday, November 04, 2004 3:34 PM
Posted To: RB7-L
Conversation: [RBG7-L] - Re: Editing Prev/Next
Subject: [RBG7-L] - Re: Editing Prev/Next


> Ok. Got it.  Actually Filter by itself (if it is exposed as a 
> Property) will allow the navigation on the Recordset that is 
> established by the original Where Clause without the Closing and 
> Reopening of the Form.

I don't think that Filter would do it by itself.  Imagine the case in
which there are 120 Smiths, and you want to start on John, but have
access to the rest.  You do:

EDIT USING Form WHERE LastName = 'Smith'

and in the On After Start EEP, filter for FirstName = 'John'.  You have
the record you want.  But what should "Previous" do?  Should it move to
the preceeding record, Ira?  That record isn't in the filter.

What you really want to do is Find the first 'John' in the record set
while keeping all other Smiths available.

Also, there's a (small) problem in that the current syntax is like this"

PROPERTY TABLE TableName METHOD

since the PROPERTY command for tables is currently used only to run
parameterless methods of the underlying dataset.  You need a further
argument 

PROPERTY TABLE TableName FILTER 'FILTER_CONDITION'

or

PROPERTY TABLE TableName FIND 'FIND_CONDITION'

--
Larry

Reply via email to