Updating Access field

I'm doing a small program to update some info in an Access table, the table doesn't have an index so I need to edit the record that the sursor is on. The two lines of code that pertain to this update are:

               rsEpi("Epi-ALT-MRN").Value = strAltMRN
But I get an error saying the provider doesn't support this.
Where am I going wrong?
Who is Participating?
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
The Edit method exist no more in ADO!

I think your problem is in the syntax. Try using the fields collection for accessing your field.
rsEpi.Fields("Epi-ALT-MRN").Value = strAltMRN

Another way, bypassing the fields collection, which is fastest is:
rsEpi!Epi-ALT-MRN = strAltMRN

tyy8Author Commented:
Also, I'm using ADO to make the connection.
You may need to add the rsEpi.Edit before the other 2, or if you are adding a new value you will need to use the rsEpi.AddNew Statement.

Hope this helps

tyy8Author Commented:
There is only an "EditMode" property that I see associated with the ADO Recordset.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.