If you have created a function called EditMode, Access is confused because EditMode is a property of dao and ado recordsets and can't be set this way.

Rename your function to something else, like SetEditMode, and try again.

HTH

George