-
Can anyone give me some clue as to why I'm getting this error:
Run-time error '5'
Invalid procedure call or argument
It happens with this code:
txtcheck_amount.Enabled = True
txtcheck_amount.SetFocus
Only it runs through the first line just fine. It's only when it gets to the txtcheck_amount.SetFocus line that it gives me this error. Any ideas why? I'm open to anything.
------------------
Ryan
[This message has been edited by Gimpster (edited 02-11-2000).]
-
You are probably getting that error because your textbox isn't visible, so it can't receive the focus.
------------------
Marty
What did the fish say when it hit the concrete wall?
> > > > > "Dam!"
-
I would believe you are doing this in your form load event..if I am right and it's in your form load event the reason is the texbox isn't there yet...put it in the form activate event.
Wayne
-
Well, I just tried making it visible right before that line to make sure, but it didn't help. Any other ideas?
------------------
Ryan
-
yup, sure enough, that solved the problem. Thanks!
------------------
Ryan