Table.filter Problem

Discussion in 'Questions (Windows Mobile)' started by alea46, Mar 18, 2009.

  1. alea46

    alea46 Member Licensed User

    I can't do a table.filter!

    I try to filter table with number.
    I got syntax error or error in executing program.

    My program is attach.

  2. Erel

    Erel Administrator Staff Member Licensed User

    tablelat.Filter("(lat>(latact+larg) OR lat>(latact-larg)) AND (lon >(lonact+larg) OR lon <(lonact-larg))")
    Basic4ppc doesn't replace latact and larg in the string with the values stored in these variables.
    For example:
    a = 5
    msgbox("The value is a"'Prints: The value is a.
    msgbox("The value is " & a) 'Prints: The value is 5.
    So in your case you have two options.
    tablelat.Filter("(lat>(" & latact & "+" & larg & ") OR lat >(" & ...
    filter = "(lat>(latact+larg) OR lat>(latact-larg)) AND (lon >(lonact+larg) OR lon <(lonact-larg))"
    filter = StrReplace(filter, 
    "latact", latact)
    filter = strReplace(filter, 
    "larg", larg)
  3. alea46

    alea46 Member Licensed User

    Thanks Erel.

    I still have problems of comprehension of the syntax of Basic4PPC.
    Sometimes, I do not succeed in finding example on the forum or in help to fill up my lack.

    One question into the forum, and it's good.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice