It seems that this should be easy to do, but I somehow I can’t see it!
I have a table in which one of the fields contains an SQL select statement (it is used to configure a combo box “on-the-fly”). On the form that maintains this table, I want to put a little “Test” button next to the control that contains the SQL statement, so that the user can test that there are no errors and that it returns something. I would essentially like to do an OpenQuery, but there is no named query to run, only the SQL statement. (I could create a permanent named query and then just change the SQL property each time, enabling me to use the OpenQuery method; but that’s a last resort).
Liked I said, it seems like it should be easy to do, but how?