Re: Strange behavior with views

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Stefan,

no, that doesn't work. Already tried that.
I've used a parameterized view and a view without parameters. In the last
case I send the parameter to the form using the do form orders with ...

It's just as if once the form loaded, there is nothing that can change the
forms filter. If i use the paramerized view and don't give the parameter
when calling the second form, vfp 'asks' for the value. If i give in the
value as asked, every function and combobox is working.

So what is the difference between first assigning the parameter for the view
and then calling the form based on that view, or not assigning the parameter
and give this one in manually??

Thanks

Rotsj


"Stefan Wuebbe" <stefan.wuebbe@xxxxxx> schreef in bericht
news:us%23RDRNPFHA.3560@xxxxxxxxxxxxxxxxxxxxxxx
>
> > This doesn't work. I find out that if i don't set the views parameter
> > with the line: pBestelNo = THISFORM.txtBESTELNO.Value
> > before opening the form i have to put in the bestelno parameter
> > manually. If i do that, the combo-box works fine!!!!
>
> If I got your description right, it would probably be easier to set your
> view's NoDatOnLoad property to .T. in the 2nd form.
> And use a custom form2.method() to requery() it on demand, e.g.
> Local pBestelNo
> pBestelNo = (yourDesiredValue)
> Requery("yourView")
>
>
> hth
> -Stefan
>
>
> --
> |\_/| ------ ProLib - programmers liberty -----------------
> (.. ) Our MVPs and MCPs make the Fox run....
> - / See us at www.prolib.de or www.AFPages.de
> -----------------------------------------------------------
>
> "Rotsj" <r.knipscheer@xxxxxxx> schrieb im Newsbeitrag
> news:f40a22ed.0504070804.291d600b@xxxxxxxxxxxxxxxxxxxxx
> > Hi,
> >
> > i've based all data of my forms on views. When I have a form opened
> > with customer data I can open a new form with orderlines by
> > doubleclicking on the customer info in the grid. In the view I have a
> > parameter as a filter so i use the following code:
> > pBestelNo = THISFORM.txtBESTELNO.Value
> > DO FORM forms\orders
> >
> > This works fine.
> > Now my problem:
> > in my order screen i have a combo-box, with this i want to show
> > - all items
> > - all open items
> > - delivered items
> > - cancelled items
> >
> > i use the following code for my combo-box:
> > m.Invoer = this.value
> > do case
> > case m.Invoer = "All"
> > set filter to
> > thisform.refresh()
> > case m.Invoer = "Open"
> > set filter to (v_orders.quantity - nvl(v_orders.delivered, 0) > 0)
> > locate
> > thisform.refresh()
> > case m.Invoer = "Delivered"
> > set filter to (v_orders.quantity - nvl(v_orders.delivered, 0) = 0)
> > locate
> > thisform.refresh()
> > case m.Invoer = "Cancelled"
> > set filter to v_orders.status_a = 'A'
> > locate
> > thisform.refresh()
> > endcase
> >
> > This doesn't work. I find out that if i don't set the views parameter
> > with the line: pBestelNo = THISFORM.txtBESTELNO.Value
> > before opening the form i have to put in the bestelno parameter
> > manually. If i do that, the combo-box works fine!!!!
> >
> > What's the difference and how can i solve this.
> >
> > Help will be appreciated!
> >
> > Rotsj
>


.



Relevant Pages

  • Re: Showing records in a Sub form based on TWO combo boxes on Main
    ... on my first Combo which is where I select the Customer. ... It is this value that i want to firstly filter my form on ... When I select "Air New Zealand" I immediately getting a Runtime Error 2448, ... Private Sub cboFilterCust_AfterUpdate ...
    (microsoft.public.access.forms)
  • Re: Please help with a serious issue
    ... but then another user also applies a different filter. ... >>User 1 selects customer 1. ... The credit card table is filtered to that ... >>Customer Shipping - Holds all possible shipping addresses for each client. ...
    (borland.public.delphi.database.ado)
  • Re: Showing records in a Sub form based on TWO combo boxes on Main
    ... So (Customer Number) has to be entered as ... It is this value that i want to firstly filter my form on ... Private Sub cboFilterCust_AfterUpdate ... the filter string from whichever comboare not blank. ...
    (microsoft.public.access.forms)
  • Re: Is Relational Hierarchy Possible with Excel
    ... the easiest is to turn on the macro recorder and apply the filter manually. ... >>> levels down the Customer hierarchy as follows: ... once a desired Contract has been ...
    (microsoft.public.excel.programming)
  • RE: Creating Forms
    ... If you can enforce Referiential Integrity, ... the Customer Table and Event Table to relate the Customer Table to the Asset ... Table and the Asset Table to the Event Table. ... luck the Event table is not recording the updated customer data. ...
    (microsoft.public.access.gettingstarted)