OK, that's kinda strange. Why do that as opposed to just getting the selected listbox value?Currently I am populating the textbox from an entry in a listbox.
"nIdentity", "Long", 4, ""
"nElectionYear", "Integer", 2, ""
"dtDateRun", "Date/Time", 8, "date first run (system supplied)"
"tQueryName", "Text", 250, "user supplied name"
"mOpenArgs", "Memo", 0, "for report/labels etc schema in global"
' populate text box with a memo field
Set qdf = CurrentDb.QueryDefs("qryBindSavedQueriesMemoField")
strQuery = qdf.SQL 'original Query's SQL
strQuery = strQuery & Left(strQuery, Len(strQuery) - 1)
strQuery = strQuery & " WHERE nIdentity = " & Me.lsbSavedQueries.Column(0)
Me.cmdCloseQuerySQL.Visible = True
Me.txtQuerySQL.Visible = True
Me.txtQuerySQL.SetFocus
Me.txtQuerySQL.ControlSource = strQuery
Me.txtQuerySQL.Requery
Me.cmdCloseQuerySQL.SetFocus
SELECT tblSavedQueries.mOpenArgs
FROM tblSavedQueries;
WHERE nIdentity = 122