Hello,
I created an Access97 database wich I just updated to Access 2000. This
database had a form that ran a VB event procedure on the current
record. This procedure prevented editing if a certain field in the
table was "y" or "Y". This form now fails to work in Access2000, giving
me an error of "Compile Error: Can't find object or library". The
debugger also highlights the "LCase" function in the event procedure.
Consulting the help function, the "LCase" function still exists in
Access 2000. As a test, I deleted the LCase reference, and the event
procedure did not produce an error; unfortunantly the LCase function is
essential for the database. I am stumped as to how to fix this. Any
help greatly appreciated...t hanks in advance.
Here is the event procedure in its entirety.
Private Sub Form_Current()
If LCase(Text66.Va lue) = "y" Then
[Combo54].Locked = True
[Combo56].Locked = True
[Expense Description].Locked = True
[Text46].Locked = True
[Combo71].Locked = True
[Field38].Locked = True
[Field31].Locked = True
[Combo63].Locked = True
[Amount].Locked = True
[Text48].Locked = True
Form.AllowDelet ions = False
Else
[Combo54].Locked = False
[Combo56].Locked = False
[Expense Description].Locked = False
[Text46].Locked = False
[Combo71].Locked = False
[Field38].Locked = False
[Field31].Locked = False
[Combo63].Locked = False
[Amount].Locked = False
[Text48].Locked = False
Form.AllowDelet ions = True
End If
End Sub
I created an Access97 database wich I just updated to Access 2000. This
database had a form that ran a VB event procedure on the current
record. This procedure prevented editing if a certain field in the
table was "y" or "Y". This form now fails to work in Access2000, giving
me an error of "Compile Error: Can't find object or library". The
debugger also highlights the "LCase" function in the event procedure.
Consulting the help function, the "LCase" function still exists in
Access 2000. As a test, I deleted the LCase reference, and the event
procedure did not produce an error; unfortunantly the LCase function is
essential for the database. I am stumped as to how to fix this. Any
help greatly appreciated...t hanks in advance.
Here is the event procedure in its entirety.
Private Sub Form_Current()
If LCase(Text66.Va lue) = "y" Then
[Combo54].Locked = True
[Combo56].Locked = True
[Expense Description].Locked = True
[Text46].Locked = True
[Combo71].Locked = True
[Field38].Locked = True
[Field31].Locked = True
[Combo63].Locked = True
[Amount].Locked = True
[Text48].Locked = True
Form.AllowDelet ions = False
Else
[Combo54].Locked = False
[Combo56].Locked = False
[Expense Description].Locked = False
[Text46].Locked = False
[Combo71].Locked = False
[Field38].Locked = False
[Field31].Locked = False
[Combo63].Locked = False
[Amount].Locked = False
[Text48].Locked = False
Form.AllowDelet ions = True
End If
End Sub
Comment