
To open a basic editor where you can enter SQL code, follow these steps: Open your database and click the CREATE tab. You can write and execute SQL statements in Access, but you have to use a back-door method to do it. So, for example, if the Text0 text box contains Thompson then the QueryDef will execute EXEC dbo.addContact N'Thompson'Īnd if the text box contains O'Rourke then the QueryDef will execute EXEC dbo. Access is designed as a rapid application development (RAD) tool that does not require programming.

Connect property from existing ODBC linked table SQL property of the QueryDef to call (EXEC) the stored procedure, like this: Option Compare Databaseĭim cdb As DAO.Database, qdf As DAO.QueryDef Connect property (ODBC connection information).


If you have an existing linked table in Access then you can use its. Probably the most straightforward way is to create a temporary pass-through query using a DAO.QueryDef object.
