I can't attach file here and it show server error and so please take a look into the screenshot of the file here http://tinypic.com/r/dbsjdf/6 and in that image you can see a button named "save". When i click save button then all the values in that datagrid should be saved in the table named "studentexam" in 2007 Access in a "single click" of save button. I have tried the following code but it saves only the first value for many times (more than 100 times a same value and no primary key set)

Re: How to insert multiple values into access from a vb6 in a single click

Posted 16 January 2013 - 04:54 PM

andrewsw, on 17 January 2013 - 12:35 AM, said:

A brief looks suggest that your MoveNext should apply to the outer recordset (rs):

rs.MoveNext

You could also move the Open and Close for rs3 outside the loop.

I have tried both movenext and close outside of the loop but it doesn't work and accidentally i replaced two values. Means, i placed the rs3.close first and then i placed rs.movenext and now it works fine friend... before i used "rs3.movenext" and thanks for your info friend !