Thanks. I thought I had tried this but I had the " in the wrong place. Been
staring at the screen too long....must go outdoors.

Cameron

Bill Thoen wrote:

> You need to use an alias variable, like this:
>  dim dentab as string
>  dim covtab as string
>  dim pop_state as string
>  dim n_rows as integer
>  dim aPop_State as alias
>
>  dim I as integer
>
>  dentab =  Tableinfo(ReadControlValue(9007),TAB_INFO_NAME)
>  covtab =  Tableinfo(ReadControlValue(9008),TAB_INFO_NAME)
>
>  n_rows = Tableinfo(dentab,8)
>  aPop_State = dentab & ".STATE"
>
>  For I = 1 To n_rows
>      Fetch Rec I from dentab
>      pop_state = aPop_State
>
> - Bill Thoen
>
> Cameron Crum wrote:
> >
> > Listers,
> >
> > I have a dialog with a  pop up control that lists all my open tables. I
> > select a table and then hit OK to process some information. I use the
> > following code to read the value from the pop up to get the name of the
> > table, but my program will not compile an I get an error when I try to
> > read a value from the table using the variable as the table name:
> >
> > dim dentab as string
> > dim covtab as string
> > dim pop_state as string
> > dim n_rows as integer
> >
> > dim I as integer
> >
> > dentab =  Tableinfo(ReadControlValue(9007),TAB_INFO_NAME)
> > covtab =  Tableinfo(ReadControlValue(9008),TAB_INFO_NAME)
> >
> > n_rows = Tableinfo(dentab,8)
> >
> > For I = 1 To n_rows
> >     Fetch Rec I from dentab
> >     pop_state = dentab.STATE  ' this is where the comile error
> > "Unrecognized Command: .." occurs
> >
> > all the other commands work fine. I've tried using an alias type for the
> > pop_state variable but to no avail. Anyone have a suggestion. This seems
> > pretty simple, but maybe I'm missing something.
> >
> > Cameron


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

Reply via email to