Hi List

It's someone please look over my shoulder time.  I can't figure out why
I'm getting an "Invalid Variable Type" error message on the following
code - line marked with the comment:

The "Create Ranges" statement is laid out exactly in accordance with
Help, and aRangeLimits() is Dim'ed as Float.
It WAS working OK till I replaced "lcColName" with "lcColCapt".  
As you can see from the 1st select statement, I accompany the select
column name with its more meaningful assoc. caption as a column alias,
which I keep alongside it in the Type array "gaAPFlds". E.g. col name
"Ethnic1" has assoc caption "Ethnic Group", so the user can read a
meaningful name.  
The select works, as I get a successful browse of the cursor (not
included here).
Previously I was using just the col. Name in the select, etc., and the
lcColName, lcColCapt vars were dim'ed as Alias.  However, the alias
select wouldn't work until I made them both String.

Any ideas?

'ppreciate it.

Terry McDonnell
---------------------------------------

Dim     lcMessage, lcAPFilePath, lcField, lcTabFile, lcDBFFile,
lcFileName, 
        lcColName, lcColCapt    As String,
        aRangeLimits()          As Float,
        aBrushStyles()          As Brush
...

Open Table lcTabFile
lcField = gaAPFldCaps( gnAPFld)
lcMessage = "Plot Thematic Map of Domain:" + CHR$(10) + SPACE$(6) +
lcField + "," + CHR$(10) + 
                "from Analysis Profile:" + CHR$(10) + SPACE$(6) +
gaAPFiles( gnSelAPID)+ "?"
If ASK( lcMessage, "Yes", "No") then
        lcColCapt = gaAPFlds( gnAPFld).AP_FieldCapt
        lcColName = gaAPFlds( gnAPFld).AP_FieldName
        Select Zone, lcColName lcColCapt
                from lcFileName
                into csrTemp
        Select * from csrTemp, BusZoneR
                Where BusZoner.ZoneNumber = csrTemp.Zone
                into csrThematicMap NoSelect

        If TABLEINFO( "csrThematicMap", TAB_INFO_NROWS) > 0 then
                Add Map Layer csrThematicMap
                Create Styles 
                  From Brush( 15, GREEN, WHITE) 'style for LOW range
                  To Brush( 15, RED, WHITE) 'style for HIGH range
                  Vary Color By "HSV" 
                  Number 10 
                  Into Variable aBrushStyles 

                Create Ranges 
                  From csrThematicMap 
                        With lcColCapt
                        Use "Equal Ranges" 
                        Number 10 
                        Round 1
                        Into Variable aRangeLimits      ' <---------
Here's the offending line
                Shade csrThematicMap 
                  With lcColCapt 
                        Ranges 
                          From Variable aRangeLimits
                          Style Variable aBrushStyles 
        Open Window Legend 
        Set map Zoom entire layer csrThematicMap 
  End If


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 18550

Reply via email to