Link to home
Start Free TrialLog in
Avatar of Galisteo8
Galisteo8

asked on

Subform: me.dirty not working

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?
ASKER CERTIFIED SOLUTION
Avatar of slamhound
slamhound

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Galisteo8
Galisteo8

ASKER

Awesome, that got it.  Well... that plus moving the event to AfterUpdate instead of Before Update.

Thanks!