Results 1 to 3 of 3

Thread: Passing 2 arguments

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617

    Passing 2 arguments

    Hello!
    I am passing two arguments to a sub

    Argform as form, cboProd as comboBox

    an in the subroutine

    I am writing Argform.cboProd.clear and am failing
    Apparently, it's looking for an actual combobox with
    that name cboProd on the form itself..

    Any ideas?

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    The combo in your sub has a reference to the form built in to it (as with all controls passed as parameters or stored in variables), so you should NOT use a form when you reference it, even if it is the correct form.

    Change "ArgForm.cboProd.clear" to "cboProd.clear", and everything will be fine.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617

    ...

    Thanks much, my friend...

    Thanks

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