R
RCGUA
I have a form with a listbox named "lstEmployeePayments". The code
below is triggered by an afterupdate event from a combobox.
Basically, you pick a name from the combobox and then the listbox
displays data for that name, but when the list is longer than the box,
the most recent data does not show because the box is scrolled to the
top. I the listbox to scroll to the bottom.
The code below scrolls to the bottom of the listbox, but, the problem
is that after it does that, then I cannot save a record. I can't do
anything with the form because I get an error messsage Run-time error
2115 "the macro or function set to the BeforeUpdate or ValidationRule
property for this field is preventing MyDatabase from saving the data
in the field."
Me.lstEmployeePayments.Selected(lstEmployeePayments.ListCount - 1) =
True
below is triggered by an afterupdate event from a combobox.
Basically, you pick a name from the combobox and then the listbox
displays data for that name, but when the list is longer than the box,
the most recent data does not show because the box is scrolled to the
top. I the listbox to scroll to the bottom.
The code below scrolls to the bottom of the listbox, but, the problem
is that after it does that, then I cannot save a record. I can't do
anything with the form because I get an error messsage Run-time error
2115 "the macro or function set to the BeforeUpdate or ValidationRule
property for this field is preventing MyDatabase from saving the data
in the field."
Me.lstEmployeePayments.Selected(lstEmployeePayments.ListCount - 1) =
True