In FoxPro2.6 you can do what is called "Macro Substitution". That is you can set a variable to a value (m.MyString="SELECT * From Dbf01 Where field1=xyz INTO ARRAY qryRay"" and have the contents of the variable executed. (&MyString)
Example:
*****************
If m.MyString="SELECT * From Dbf01 Where field1=xyz INTO ARRAY qryRay"
The command of "&MyString" would actually execute the query
Another Example:
*****************
m.FldTxt="123"
m.MyString="And field2="+m.FldTxt
Select *;
From Dbf01;
Where field1="xyz";
&MyString ;
Into Array qryRay
I am trying to accomplish the same type of thing in VB for an Access query based on field data from a form.
Example:
*****************
If m.MyString="SELECT * From Dbf01 Where field1=xyz INTO ARRAY qryRay"
The command of "&MyString" would actually execute the query
Another Example:
*****************
m.FldTxt="123"
m.MyString="And field2="+m.FldTxt
Select *;
From Dbf01;
Where field1="xyz";
&MyString ;
Into Array qryRay
I am trying to accomplish the same type of thing in VB for an Access query based on field data from a form.