dim db as dao.database
dim rs as dao.recordset
dim str as string
str = "Your SQL String"
set rs=db.openrecordset(str,dbopensnapshot)
if rs.eof and rs.bof then
' no records exit exit sub
end if
'assuming you have one record
forms!YourformName!YourcontrolName = rs.fields(i) 'where i is the desired field number. Note fields are numbered 0 thru n.
rs.close
db.close
set rs=nothing
set db=nothing