Hi
I have a form that works perfectly......
Until I try and add a new text box
as soon as I do I get the following when I use the combox.
BUT IT DOES
because 5 seconds earlier before I added the text box it worked !!!
The After_Update event is
It still doesn't work then after I delete the control I have just entered
Any Ideas
Phil
I have a form that works perfectly......
Until I try and add a new text box
as soon as I do I get the following when I use the combox.
Code:
Run-time '2467'
The expression you entered refers to an object that is closed or doesn't exist.
BUT IT DOES
because 5 seconds earlier before I added the text box it worked !!!
The After_Update event is
Code:
Private Sub cmb_Search_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
G_STAFFNO = Me.cmb_Search.Value
Set rs = Me.Recordset.Clone
rs.FindFirst "[STAFFNO] = '" & Me![cmb_Search] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
For Each ctrl In Forms(G_CalledForm).Detail.Controls
CtrlName = ctrl.Name
If Left(CtrlName, 3) = "as_" Then
Forms(G_CalledForm).Detail.Controls(CtrlName).Visible = True
End If
Next ctrl
End Sub
It still doesn't work then after I delete the control I have just entered
Any Ideas
Phil