sbarlow
05-29-2001, 08:55 AM
I am trying to put an SQL query result into a recordset. It only puts one entry into the recordset and I know there are multiple results from the query. How do i get all of the results fo the query to go into the recordset and can't I put the recordset into a list box or some other way of displaying it on a form?
littlebigman_uk
05-30-2001, 09:17 AM
Here is a simple way of filling a recordset with an sql query
dim rs as recordset
dim criteria as string
criteria="select all * from [tblname] where [tblname].[fieldname]='value'; "
set rs=currentdb.openrecordset(criteria)
do while not rs.eof
rs.movenext
loop
rs.close
//above will load a recordset and loop through the recordset
combo0.rowsource=criteria
// above will load a combobox with the same sql statement
good luck.