L
Liz O'Donoghue
I have a subform in datasheet view that consists of a combo box, a
checkbox and 12 numeric fields. Subform is linked via a uniqueid to
the record of the parent form.
I've added code to the After Update event of the combo box which uses
the DLookup to pull a "default" value for the checkbox based on what
is selected in the combo box and set the value of the checkbox to the
default value. The user then has the option to "customize" the value
of the checkbox (sometimes they need the option to override the
checkbox).
This all works great until a user pastes *multiple rows* of "related"
data into the subform datasheet. The users generally copy and paste
from Excel. It appears the AfterUpdate event is firign for the
combobox in each row that is pasted (when i fire a msgBox for each
row, a msgbox pops up for each line pasted and can return the default
lookup value).
However, the value of the checkbox is not then updated based on the
data entered in the combobox.
Any ideas on how to get around this issue?
checkbox and 12 numeric fields. Subform is linked via a uniqueid to
the record of the parent form.
I've added code to the After Update event of the combo box which uses
the DLookup to pull a "default" value for the checkbox based on what
is selected in the combo box and set the value of the checkbox to the
default value. The user then has the option to "customize" the value
of the checkbox (sometimes they need the option to override the
checkbox).
This all works great until a user pastes *multiple rows* of "related"
data into the subform datasheet. The users generally copy and paste
from Excel. It appears the AfterUpdate event is firign for the
combobox in each row that is pasted (when i fire a msgBox for each
row, a msgbox pops up for each line pasted and can return the default
lookup value).
However, the value of the checkbox is not then updated based on the
data entered in the combobox.
Any ideas on how to get around this issue?