Subform: me.dirty not working
Posted on 2004-11-22
I've got a form and a subform in Access 2000 (with SQL Server 2000 back-end, so this is an ADP, in case that's important).
In the subform, users can enter a value in a column called EbayNum. Some event code runs so that as SOON as the EbayNum value is entered into the subform control, the rest of the subform row will populate with other data, whether or not the user has clicked off of that subform row.
Generally this works fine, except that I need to have the subform get committed before the user has clicked off of the row. I am using Me.Dirty = False, but I keep getting the following error: "Runtime error '2115': The macro or function set to the BeforeUpdate or Validation Rule property for this field is preventing Microsoft Access from saving the data in the field."
Any clue why I'm getting this error? If I comment out the Me.Dirty statement, I can MANUALLY click the little pencil on the left of the subform row to make it not dirty.... Why can't I make that happen in the event code?