My suggestion is to move the content of the property to a varaible before executing as a macro. I have never had much luck in expending a property's content with '&' macros.
cSQL = THisForm.SQLQuery
&cSQL
>Hi,
>
>I am trying to create a form that contains 5 rows of combo and text boxes that forms the basis of a "Where" condition in a SQL-Select query.
>
>1st combo box represents the field list of the table.
>2nd combo box represents the operators i.e. ==, >=, etc
>3rd test box represents the value to test the query (user enters value)
>4th combo box represents the logical operators i.e. AND, OR, END (End signafies that the user is finished entering the where clause.
>
>When the "Run Query" button is clicked the code generates an error
>"Unrecognised command verb"
>
>The line of code reads as follows:
>
>"&THisForm.SQLQuery"
>
>The property above contains the following line:
>
>"Select * from membership where town == 'Cumnock' Order By 1 ASC Into Cursor Temp"
>
>I cannot see the error in the code. I have tried to execute the SQL statement manually and it works.
>
>Does anybody have any solutions?
>
>
>thanks in advance
>
>Jason
Greg Reichert