Hi All,
I'm changing a record source on a form when the user clicks a "save" button.
I'm doing this to store a value from the current form in a table that is not part of the default form query.
This works fine.
I have a separate button on my form called "Home", when the user clicks this button it requerys the current form which triggers the before update event to run, this in turn brings up a message box which asks the user if they want to save or not. If they click yes then it runs the SaveButton click() code.
For some reason when the user presses the save button and then exits, everything works but if a user presses the “home” button which triggers the save button then it brings up the “2107 The Value you entered doesn’t meet the validation rule defined for the field or control.” Runtime error and stops on the change recordsource command.
I’ve no idea why triggering the same code directly from a button or indirectly from a before update event has two different outcomes.
Anyone know what’s going on?
Cheers
Steve
I'm changing a record source on a form when the user clicks a "save" button.
I'm doing this to store a value from the current form in a table that is not part of the default form query.
This works fine.
I have a separate button on my form called "Home", when the user clicks this button it requerys the current form which triggers the before update event to run, this in turn brings up a message box which asks the user if they want to save or not. If they click yes then it runs the SaveButton click() code.
For some reason when the user presses the save button and then exits, everything works but if a user presses the “home” button which triggers the save button then it brings up the “2107 The Value you entered doesn’t meet the validation rule defined for the field or control.” Runtime error and stops on the change recordsource command.
I’ve no idea why triggering the same code directly from a button or indirectly from a before update event has two different outcomes.
Anyone know what’s going on?
Cheers
Steve
Last edited: