Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8087 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I am hoping someone can help me and that I can make some sense. I am trying to create a script that will do finds based on a range of numbers. Basically, if the record is part of group 13. I need it to find all records in groups 1-15. If it part of group 23, i need it to find all records in groups 16-30, and so on. I tried an If function like so- If (1 < House Number < 15) then go into find mode, paste 1...15 in house number, perform find, then I have else, If 16<House Number<30, go into find mode, etc, etc. (And I'm using greater than or equal to, not just greater than) The problem seems to be in the if functions because everything else seems to work ok. How do I structure the If function to determine what group of numbers the entry falls into???

Posted

Once you're using the "insert" commands properly, you'll have it working.

But here's another suggestion... assuming you may have large numbers of records, coding an "if" test for every range of 15 will get tedious and slow. And then if you ever change to groups of 20, you'll have tons of work to do.

Instead, use a little math...

SetNumber = Int(MyNumber / 15)

FindRange = NumToText((SetNumber * 15) + 1) & "..." & NumToText((SetNumber+1)*15)

Then Insert FindRange into the appropriate field in Find Mode.

HTH.

This topic is 8087 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.