Receiving this message when using visible

  • Thread starter Thread starter Christy Turner
  • Start date Start date
C

Christy Turner

The expression After Update you entered as the event
property setting produced the following erre: A problem
occurred while Property Database was communicating with
the OLE Server of ActiveX Control.


Here is the code I am running. I am trying to make a
combo box visible if an item in an option group is picked.


Private Sub Mat_Select_AfterUpdate()

If .[Mat Select].Value = 1 Then
.[Prod].Visible = True
Else
.[Prod].Visible = False
End If

End Sub
 
Christy Turner said:
The expression After Update you entered as the event
property setting produced the following erre: A problem
occurred while Property Database was communicating with
the OLE Server of ActiveX Control.


Here is the code I am running. I am trying to make a
combo box visible if an item in an option group is picked.


Private Sub Mat_Select_AfterUpdate()

If .[Mat Select].Value = 1 Then
.[Prod].Visible = True
Else
.[Prod].Visible = False
End If

End Sub

This is the complete code for the event? I see no "With" statement
giving the base object for these dot-qualified names [Mat Select] and
[Prod]. That may be the source of your problem -- a compile error
occurring at run time. Are they supposed to be controls on the current
form? If so, you could wrap the code in a "With Me ... End With"
construct:

With Me
If .[Mat Select].Value = 1 Then
.[Prod].Visible = True
Else
.[Prod].Visible = False
End If
End With
 
Back
Top