Re: OPO: QueryWhere()

From: S. Harvester <sharvester_at_qualcomm.com>
Date: 1996/05/07
Message-ID: <318F6D38.4C06_at_qualcomm.com>#1/1


Christopher Desforges wrote:
>
> I was hoping somebody could tell me if I am using QueryWhere
> correctly.
>
> I am trying to populate a repeater display whose RecordSource is a
> View. I would also like to give the user the ability to filter out
> data by either using a popup list or a radio-frame (and depending on
> their selection different information will be displayed).
> I've been trying to use the QueryWhere method to modify the data but
> to no avail. It seems to work only once per form call. I have
> included an example of the code in my popup list's PostChange() (Note
> thant repapn is the name of the repeater):
>
> PostChange()
> REM msgbox Self.value
> REM temp = Self.value
> REM EXEC SQL SELECT part_a_pn INTO :a_desc FROM tbl_parts WHERE
> part_typeid = :temp
> REM msgbox sqlerrtext()
> REMmsg = a_desc(0) & CHR$(13) & a_desc(1) & CHR$(13) & a_desc(2)
> REM msgbox msg
>
> frmParts.repapn.QueryWhere("part_typeid = " & Self.value)
>
> Is this the correct to program this functionality?
>
> *********************************************
> Chris Desforges
> cwd7_at_cornell.edu
> Cornell University
> MEng. in Electrical Engineering
> *****************************************

An easier way is to set the repeater as a child to the popup field/form. You will not need the code in the PostChange method. Set the following properties for the repeater as follows and OPO will handle everything else.

LinkDetailColumn = part_typeid
LinkMasterColumn = (The column for the popup list) LinkMasterForm = (The form that contains the popup list) LinkMasterUpd = OrphanDetails

-- 
Scott Harvester

phone: (619) 658-4713            email: sharvester_at_qualcomm.com
Received on Tue May 07 1996 - 00:00:00 CEST

Original text of this message