I'd like to use the follwong code to replace more than one field in the query. Can you tell me how that is done?
Code:
Dim qdf As DAO.QueryDef
Dim qdfOLD As String
Set qdf = CurrentDb.QueryDefs("qry_55")
With qdf
qdfOLD = .SQL
[B] .SQL = Replace(.SQL, "c.cnty_cd = '01'", "c.cnty_cd='11'")[/B]
' Code to do stuff with SQL-string/query
.SQL = qdfOLD ' Reset SQL to old setting
End With
Set qdf = Nothing