Results 1 to 5 of 5

Thread: Confused about error

  1. #1

    Thread Starter
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    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).]

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    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!"

  3. #3

    Thread Starter
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    Well, I just tried making it visible right before that line to make sure, but it didn't help. Any other ideas?

    ------------------
    Ryan

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    Post

    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

  5. #5

    Thread Starter
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    yup, sure enough, that solved the problem. Thanks!

    ------------------
    Ryan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width