Question : I have a query, now how to use the result?

My simple query always generates one result:

SELECT PresetSituations.[ID], PresetSituations.[DefaultNotes]
FROM PresetSituations
WHERE (((PresetSituations.[ID])=[Forms]![Session_Sessions]![Preset situation]));

Now I have my query, how do I programatically run it and stick the contents of the DefaultNotes column into a textbox.

I guess I'd use Me.Query(queryname)... and then set the textbox.value property to the result, but not sure how to do select the result in access...

Answer : I have a query, now how to use the result?

you will not get any error if you use this and no need to open the query as recordset

me.txtboxName=dlookup("DefaultNotes","QueryName")
Random Solutions  
 
programming4us programming4us