Bryan - Gendev
Programmer
On my Query form I have some boilerplate SQL statements available which are pretested and won't 'crash'. They are run by being selected in a list box into a text box then a command button with the code shown below.
I also have a text box in which the user can type an SQL statement.
I use this code on a command button to run it
<code>
LOCAL SQL
SQL = ALLTRIM(thisform.text2.Value)
&SQL
</code>
Is there a way to catch errors in the typed statement when the command is run via the &SQL command?
I would like to put up a message to inform the user.
Thanks
GenDev
I also have a text box in which the user can type an SQL statement.
I use this code on a command button to run it
<code>
LOCAL SQL
SQL = ALLTRIM(thisform.text2.Value)
&SQL
</code>
Is there a way to catch errors in the typed statement when the command is run via the &SQL command?
I would like to put up a message to inform the user.
Thanks
GenDev