>Is there a way to create a table using variable name. For example if I generate a random number using rand(), and put that number in variable, how can I use that variable name to create a table. Also, how can I use that variable name to attach to controlsource in grid.
>
>ranvar = rand()
>
>create table ranvar ....
>
>grid1.column1.controlsource = ranvar.cto
>
>I am having a problem creating a table based on value in variable ranvar and also attaching this value (which contains table name) to grid controlsource. Help appreciated
>
>thanks
>Nick Patel
The variable have to have the character value in order to be used for the table name. I would suggest to use SYS(2015) to generate the name:
ranvar = SYS(2015)
create table (ranvar) (cto c(10))
grid1.RecordSource = ranvar
grid1.column1.controlsource = ranvar+".cto"
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison