D
default105
Sorry to post this again but I have not gotten a response and I really do
need help. I was designing a db in Access 2003 but the code acts differently
on Access 2000.. I have a reminder form that has 2 listbox and a navigation
control subform. The one listbox(located in the form header) is populated
with criteria the same as the form. The second listbox (located on form
detail) is populated by a txtbox on the form to retrieve the items associated
with that ID since each one can very. I have the onClick event on the first
listbox set to findrecord for easy navigation. Herein is where the problem
began. On the Form Current event I have the following to highlight the
current record in the one listbox
Dim lngPOCRec As Long
lngPOCRec = Me.CurrentRecord - 1
Me.ListUnrecOnEmployee.SetFocus
Me.ListUnrecOnEmployee.ListIndex = lngPOCRec
This works fine on 2003, I can click on the navigation subform and the
listbox and both will cycle through the records accordingly. However on
2000, it does not shift focus back to the form detail when I click on either
one, forcing you to have to click twice slowly on the nav subform and the
other command buttons. I found that if I would add Me.Dirty=False after the
code above, the subform will work fine but the listbox onclick will give
runtime error 2115 - The macro or function set to the BeforeUpdate or
Validation rule property of this field is preventing Microsoft Access from
saving the data field. This points to the Me.Dirty=False in the code. How
can I get around this weird variation between 2000 and 2003. I use this db
at work so I can not use 2003 or else this would not be an issue. What is
strange is that the file format is 2000 meaning I do not have to convert it.
Please help and many thanks.
need help. I was designing a db in Access 2003 but the code acts differently
on Access 2000.. I have a reminder form that has 2 listbox and a navigation
control subform. The one listbox(located in the form header) is populated
with criteria the same as the form. The second listbox (located on form
detail) is populated by a txtbox on the form to retrieve the items associated
with that ID since each one can very. I have the onClick event on the first
listbox set to findrecord for easy navigation. Herein is where the problem
began. On the Form Current event I have the following to highlight the
current record in the one listbox
Dim lngPOCRec As Long
lngPOCRec = Me.CurrentRecord - 1
Me.ListUnrecOnEmployee.SetFocus
Me.ListUnrecOnEmployee.ListIndex = lngPOCRec
This works fine on 2003, I can click on the navigation subform and the
listbox and both will cycle through the records accordingly. However on
2000, it does not shift focus back to the form detail when I click on either
one, forcing you to have to click twice slowly on the nav subform and the
other command buttons. I found that if I would add Me.Dirty=False after the
code above, the subform will work fine but the listbox onclick will give
runtime error 2115 - The macro or function set to the BeforeUpdate or
Validation rule property of this field is preventing Microsoft Access from
saving the data field. This points to the Me.Dirty=False in the code. How
can I get around this weird variation between 2000 and 2003. I use this db
at work so I can not use 2003 or else this would not be an issue. What is
strange is that the file format is 2000 meaning I do not have to convert it.
Please help and many thanks.