prabha_friend
Prabhakaran Karuppaih
- Local time
- Today, 19:02
- Joined
- Mar 22, 2009
- Messages
- 966
Hello friends. I am getting this error “Variable required - can't assign to this expression” when I tries to iterate through all the open form in a close event of a form.
Private Sub Form_Close(Cancel As Integer)
For Each Form In Forms
For Each Control In Form.Controls
If Control.ControlType = 112 Then
For i = 0 To Control.Controls.Count - 1
If Control.Controls(i).Properties("Tag") = "Employees" Then Control.Controls(i).Requery
Next i
End If
If Control.Properties("Tag") = "Employees" Then Control.Requery
Next Control
Next Form
End Sub
I even tried the Unload event also. The Same error returned.
Private Sub Form_Close(Cancel As Integer)
For Each Form In Forms
For Each Control In Form.Controls
If Control.ControlType = 112 Then
For i = 0 To Control.Controls.Count - 1
If Control.Controls(i).Properties("Tag") = "Employees" Then Control.Controls(i).Requery
Next i
End If
If Control.Properties("Tag") = "Employees" Then Control.Requery
Next Control
Next Form
End Sub
I even tried the Unload event also. The Same error returned.