February 5, 200818 yr It's strange but I can't get my head around this. In a table (A) I have a numberfield with the age of a person (age). In another table (: I have records with two numberfields: minAge (minimum Age) maxAge (maximum Age) I need to find in table ( all the records where the 'age' from table A falls between minAge - 5 years and maxAge + 5 years. I start my script from table A where I set a variable $age to 'age'. Go to table B Enter find mode set field minAge > $age -5 ... and now I'm stuck... set field maxAge < $age+5 Perform find doesn't give the right result. What do I miss here ? TIA
February 5, 200818 yr Author Thanks Fitch. Must be the frustration. but that is the way I have it. The problem is that if f.i. there is a record in B with minAge 21 and maxAge 28 and a second one with minAge 22 and maxAge 33 and the age in A is 23, the search result should be the two records. It only gives 1 record. When I do the search manually in B I get the two records. With the script not...
February 5, 200818 yr Author Thanks _henry_, where was I all that time. The second line should be: SetField(maxAge); ">="&$age +5 to have the the table A age between the table B min/max range. It's not a bad idea to take some distance for a few hours, return to the file, try again and THEN post a question....if need be....
Create an account or sign in to comment