Kryst51
Singin' in the Hou. Rain
- Local time
- Yesterday, 23:01
- Joined
- Jun 29, 2009
- Messages
- 1,898
I have the following code in a continuous form's Before update event:
When I test the code I get the following error:
and the red line in the code above is highlighted. I have googled this but most hits involve excel or give explanations that I don't understand. This is the first time I have ever tried to check all controls on a form at once, and would really prefer one error message to one for each control (that seems tedious) So any help in figuring this out would be helpful, as I can't even get to test my message box to see if I have it set up correctly.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
[COLOR=red]If Len(Nz(Me.Controls, "")) = "" Then[/COLOR]
Dim Response As Integer
Response = MsgBox("You must fill in all fields", vbOK)
Me.TagNum.SetFocus
End If
End Sub
When I test the code I get the following error:
Runtime Error '450':
Wrong number of Arguments or invalid property assignment
and the red line in the code above is highlighted. I have googled this but most hits involve excel or give explanations that I don't understand. This is the first time I have ever tried to check all controls on a form at once, and would really prefer one error message to one for each control (that seems tedious) So any help in figuring this out would be helpful, as I can't even get to test my message box to see if I have it set up correctly.