Correction..

Where I state:
> The reason for the 01..09 is that the SET expects 2 values
> and will bomb rbase bad if it doesn't get the mininimnum
> it expects.

Should be (the SET should be SGET)
The reason for the 01..09 is that the SGET expects 2 values
and will bomb rbase bad if it doesn't get the mininimnum
it expects.

To add to this You could name your buttons "01 Countyname"
as long as the two first numbers letters are the numbers
you want to pass to the SGET statement.

You can also use Victors input "YourProgram.EEP USING 1 "
and use the switch statment like in my example for more
control if needed. Test it out though I have some instances
where it didn't use .%1 and it put the USING value in a
variable named differently like .%2-1 or something like %.1-1
and so on.. Just to let you know to test for this. I haven't
figured out why it does this, but I always look for it doing
a trace before implementing it.


OOORRRR if you want a little better looking interface... put the County Name on the button. Then use the: SET VAR vm_colname = (LUC((SGET(.#FORM_COLUMNNAME,9,1)))) IF vm_colname IS NOT NULL THEN SWITCH(.vm_colname) CASE 'FIRSTCOUN' SET VAR vm_cntynum = '1' Edit using CRC where countynumber = .vm_cntynum BREAK CASE 'SECONDCOU' SET VAR vm_cntynum = '2' Edit using CRC where countynumber = .vm_cntynum BREAK --.... through CASE 'THIRDCOUN' SET VAR vm_cntynum = '3' Edit using CRC where countynumber = .vm_cntynum BREAK ENDSW ENDIF A few things to note here again. Where I am using 9 in SGET -- whatever the letter count in your shortest county name is what this number has to be. Then in your case statements you can put (IN CAPS) cause the LUC is going to return CAPS you can put in the amount of letters you have in stipulated as how many is going to be returned. If the name of the button is longer than 9 char in this case it doesn't matter.

Jim

Jim Limburg wrote:
Tom

I would follow this format: (This will work in 6.5 not version 7.

Create one eep -- name whatever...

The buttons would be named 01 - 83 -- Must stipulate that numbers
below 10 be named 01,02,03..09,etc.. Will explain in a minute.

In your eep put the following code.
SET VAR vm_colname TEXT = NULL
SET VAR vm_colname = (LUC((SGET(.#FORM_COLUMNNAME,2,1))))
IF vm_colname IS NOT NULL THEN
  SWITCH(.vm_colname)
    CASE '01'

      BREAK
    CASE '02'

      BREAK
      --.... through
    CASE '83'

      BREAK
  ENDSW
ENDIF

If you don't want a lot of individual control you could just do this:

In your eep put the following code.
SET VAR vm_colname TEXT = NULL
SET VAR vm_colname = (LUC((SGET(.#FORM_COLUMNNAME,2,1))))
IF vm_colname IS NOT NULL THEN
  Edit using CRC where countynumber = .vm_colname
ENDIF

The reason for the 01..09 is that the SET expects 2 values
and will bomb rbase bad if it doesn't get the mininimnum
it expects.

Then all you would have to do is call the eep behind each button
It will read the First 2 Letters of the button and go from there.

Jim Limburg

Thomas Eldred wrote:

I am trying to be clever, but am finding myself rather un-equiped for that
activity....


I have a cool form that uses our state map as the background image. I want
to select the county by having the user click on the map.


My question is do I need to set 83 buttons with 83 different eeps setting
the variable countynumber and then have the eep launch the form using that
variable as where clause? or is there a more efficient way to do this?


also in using the eep, in order to launch a form called CRC after setting
the variable what syntax do I use, the form is generated in the form
designer? would I use the "Edit using CRC where countynumber = xx"

Thanks for your assistance

Tom Eldred







Reply via email to