main logo
Subject: Re: Requery Question
Author: Ed Leafe
Posted: 2002/04/03 16:08:49
 
View Entire Thread
New Search


<i><font color="#663300">OK, my form SHOULD show me all records for a particular filter but they aren't.
When I say:

requery('v_childwparentparam') -- I get the first child record for the filtered set but the navigation buttons are grayed out (and I know there are multiple records to view)</font></i>

You should never issue a data-layer command, such as REQUERY(), from the GUI layer.

<i><font color="#663300">When I say:

thisform.requery()

I get working nav buttons BUT the data is ALL records in the child table (ignores view parameter - does NOT ask for VP -- already knows that because statementon line before is: thisform.mychildbizobj.cparentid = lcparentid)</font></i>

How is the bizobj that is responsible for that view configured? Does it know that it has to set a view parameter? Does it know where to get the value for that v.p.?

<i><font color="#663300">When I say:

thisform.requery('v_childwparentparam')

I get the following error:

Error #: 1238
Message: No PARAMETER statement is found
Line #: 1
Code: If NOT This.BeforeRequery()
Method: requery
Object: frm_mylookupallchildren</font></i>

Of course - the form's Requery() method doesn't take a parameter. It's sole purpose is to pass the requery message to its primary bizobj.

<i><font color="#663300">HELP!!! I'm really frustrated here. How should my requery look and get all children for a particular parent in a form set to navigate one record at a time through the children records with the navbuttons on the form?</font></i>

The bizobj is the only thing that should be controlling the number of records displayed. You need to make sure that the bizobj is configured to set the v.p. correctly - see the Step-By-Step guide for examples.

Also, remember that the nav buttons will step through the primary bizobj of the form. If you have a parent-child relationship, clicking the nav bar buttons will step through the parent records, not through the current parent's child records. That's something you'll need to code yourself. I'm working on just that sort of thing in the SBS guide now; and I hope to have it within a week or so.
<font color="#cc0000"> ___/
/
__/
/
____/</font>
Ed Leafe
 
©2002 Ed Leafe
<-- Prior Message New Search Next Message -->