does anyone else have major issues with this run-time error??
Run-time error '2185':
You can't reference a property or method for a control unless the control has the focus.
I keep on getting this error unless I put property.setfocus in front of everything.. seems kind of retard and waste of code etc..
for ex.
i'm trying to enable a control when 4 fields have been entered.
Private Sub txt4_AfterUpdate()
If txt1.Text <> "" And txt2.Text <> "" And txt3.Text <> "" Then
cmdGo.Enabled = True
End If
End Sub
problem here is i get that error unless i do this...
Private Sub txt4_AfterUpdate()
txt1.setfocus
If txt1.Text <> ""then
txt2.setfocus
if txt2.Text <> "" then.....
txt3.setfocus
if txt3.Text <> "" Then
cmdGo.Enabled = True
End If
end if
end if
End Sub
one other question: is there a way in access that i can group everything together and refer to it as group1? i can group, btu can't seem to reference it.
last question: is there a way to set txtboxes as part of an array?
thanks for reading this far! thank you veyr much for any help/pointers provided!
Run-time error '2185':
You can't reference a property or method for a control unless the control has the focus.
I keep on getting this error unless I put property.setfocus in front of everything.. seems kind of retard and waste of code etc..
for ex.
i'm trying to enable a control when 4 fields have been entered.
Private Sub txt4_AfterUpdate()
If txt1.Text <> "" And txt2.Text <> "" And txt3.Text <> "" Then
cmdGo.Enabled = True
End If
End Sub
problem here is i get that error unless i do this...
Private Sub txt4_AfterUpdate()
txt1.setfocus
If txt1.Text <> ""then
txt2.setfocus
if txt2.Text <> "" then.....
txt3.setfocus
if txt3.Text <> "" Then
cmdGo.Enabled = True
End If
end if
end if
End Sub
one other question: is there a way in access that i can group everything together and refer to it as group1? i can group, btu can't seem to reference it.
last question: is there a way to set txtboxes as part of an array?
thanks for reading this far! thank you veyr much for any help/pointers provided!