vba - DAO Recordset Changing by itself on Edit or Update -


i'm experimenting issue when trying .edit or .update dao.recordset on vba/access project. i'm using codevba extension create classes tables automatically. issue occurs on class created way.

the recordset variable declared way:

dim recordset dao.recordset set recordset = currentdb.openrecordset("ordres de travail", dbopendynaset) 

i have 2 lines in code:

    recordset.edit     recordset.fields("commentaire indisponibilité").value = nullifemptystring(me.commentaireindisponibilité) 

during execution, monitoring selected record looking @ value of primary key in local variables panel. before execution of first line, primary key value 1409, during, , after, moves record 91! no steps missed (i'm using step step execution).

i'm quite disappointed this, , can't have right record edited.

if of have idea of going on, i'll glad know!

if running code inside of form, there object named recordset form property. compiler getting confused.

change variable name orecordset (or favorite, rs)

dim rs dao.recordset set rs = currentdb.openrecordset("query", dbopendynaset)  rs     .edit     .fields("field").value = ""     .update end 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -