i want to make it simple with for next function. but my code doesn't accepted by the VBA. Why?
Very non-specific question there...
You need to actually tell us what it was that you wanted to have happen and then what really happened. Provide in errors with the
EXACT error number AND text and if needed, a little example of the data... generic data is just fine, so long as it reflects the actual data one would be using
With that said:
Your database sounds like it is not normalized. Please take a look at the following:
A Tutorial for Access Database Normalization and Table Structures.
I get this impression because this is what your table sounds like
{tbl_name
[table_primarykey]
[answer1] text(some limit)
[answer2] text(some limit)
[answer3] text(some limit)
[answer4] text(some limit)
(...)
[answer50] text(some limit)}
(note these are not RECORD entries, these are fields)
Your question appears to ask how to add
[answer51] text(some limit)
Your code is an attempt to add a new record:
[table_primarykey]; [answer1]; ...; [answer50]
(some current value); "Some question1"; ...; ""Some question50"
(some current value +1); "Some question1a"; ...; ""Some question50a"
(...)
(some current value +50); "Some question1zz"; ...; ""Some question50zz"
Your missing an .update just before the next at end of the loop too in order to save the record.
(Note: I've not actually vetted the syntax of your code. I've only taken a quick glance as I'm on may way out the door to the lab)
Please work thru the links and provide more information if I have misunderstood your question.