Originally posted by mikezcg
I have no experiance with recordsets in access.
What i would like to do is select * from a table.
1 column will be blank
then i would like to add an auto incrementing value to that field
Dim iNum as integer
iNum = 0
Do while not RS.eof
iNum = iNum +1
rs.field(1) = iNum
can anyone help????
Assuming you don't need too much help since you're close, try adding rs.Edit before you assign a value and finish off with rs.Update. Also, if your trying to add to the first column, I think it is 0 based so make it rs.Fields(0) = iNum + 1.
I'm new to this, but this question I struggled with. Three points
1) Be sure and declare your recordset and queries at the start.
2) I find it prudent to delete my temporay queries. If not these often are saved and will often prevent code from executing on next startup
3) The first field is (0). The order of a particular recordset however is determined by the order the recordset was built in the query. If you are working directly in a table, then the order is the table order.
Hope this helps