I have some experience with prepared statements on the web, and I can get a prepared statement to execute, but the syntax for using it in a normal select eludes me.
this simple example: I'm just using for figuring out the syntax.
I'm just guessing at the "Set rst" line.
Code:Dim db As dao.Database Dim qdf As dao.QueryDef Dim strSql As String Set db = CurrentDb Dim settingParameter As String settingParameter = "Upload Path" strSql = "SELECT settings.str_parameter FROM settings WHERE settings.stg_name = [settingName];" Set qdf = db.CreateQueryDef(vbNullString, strSql) qdf.Parameters("settingName").Value = settingParameter Set rst = qdf.OpenRecordset(strSql) dbs.Close qdf.Close