D
Dave370
Hi,
I have just come across a problem that Microsoft Access 2002 SP3 appears to
have yet the original (No Service Packs) doesn't.
The problem occurs with some Visual Basic code that I wrote a long time ago
and yet I have never had this problem before. What the code is supposed to do
is if a tick box on a form is checked, a sub-form in that form is suppose to
not allow Additions Deletions and Edits to the records. If unchecked,
Additions, Deletions and Edits are allowed. The code is run when the form
opens and whenever the tick box is ticked or unticked (AfterUpdate).
The error message I receive is:
Compile Error:
Object library feature not supported
What's really strange though is that the code run when opening the form
works fine but AfterUpdate doesn't even though they're identical. I have
looked at the enabled references on both machines (One has SP3 one doesn't)
and they are identical. Here is the code:
Private Sub Form_Open(Cancel As Integer)
Dim ItemString As Form
Set ItemString = Me![Invoice Item].Form
If Invoiced = True Then
ItemString.AllowAdditions = False
ItemString.AllowDeletions = False
ItemString.AllowEdits = False
Else:
ItemString.AllowAdditions = True
ItemString.AllowDeletions = True
ItemString.AllowEdits = True
End If
End Sub
Private Sub invoiced_check_AfterUpdate()
Dim ItemString As Form
Set ItemString = Me![Invoice Item].Form
If Invoiced = True Then
ItemString.AllowAdditions = False
ItemString.AllowDeletions = False
ItemString.AllowEdits = False
Else:
ItemString.AllowAdditions = True
ItemString.AllowDeletions = True
ItemString.AllowEdits = True
End If
End Sub
I have just come across a problem that Microsoft Access 2002 SP3 appears to
have yet the original (No Service Packs) doesn't.
The problem occurs with some Visual Basic code that I wrote a long time ago
and yet I have never had this problem before. What the code is supposed to do
is if a tick box on a form is checked, a sub-form in that form is suppose to
not allow Additions Deletions and Edits to the records. If unchecked,
Additions, Deletions and Edits are allowed. The code is run when the form
opens and whenever the tick box is ticked or unticked (AfterUpdate).
The error message I receive is:
Compile Error:
Object library feature not supported
What's really strange though is that the code run when opening the form
works fine but AfterUpdate doesn't even though they're identical. I have
looked at the enabled references on both machines (One has SP3 one doesn't)
and they are identical. Here is the code:
Private Sub Form_Open(Cancel As Integer)
Dim ItemString As Form
Set ItemString = Me![Invoice Item].Form
If Invoiced = True Then
ItemString.AllowAdditions = False
ItemString.AllowDeletions = False
ItemString.AllowEdits = False
Else:
ItemString.AllowAdditions = True
ItemString.AllowDeletions = True
ItemString.AllowEdits = True
End If
End Sub
Private Sub invoiced_check_AfterUpdate()
Dim ItemString As Form
Set ItemString = Me![Invoice Item].Form
If Invoiced = True Then
ItemString.AllowAdditions = False
ItemString.AllowDeletions = False
ItemString.AllowEdits = False
Else:
ItemString.AllowAdditions = True
ItemString.AllowDeletions = True
ItemString.AllowEdits = True
End If
End Sub