Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Unanswered: help with call functions and varaibles

    i have a call function that uses a varaible. the varaible is used to hold the name of an object on the form ie

    Sub ComboVar(ComboVar As String)

    ComboVar.RowSourceType = "Table/Query"


    im getting the error invalid qualifier on this line. im thinking its cause the db is looking for combovar not what the varaible is storing.
    any suggestions?
    Jim

  2. #2
    Join Date
    Mar 2003
    Location
    London
    Posts
    40

    Re: help with call functions and varaibles

    Originally posted by JDionne
    i have a call function that uses a varaible. the varaible is used to hold the name of an object on the form ie

    Sub ComboVar(ComboVar As String)

    ComboVar.RowSourceType = "Table/Query"


    im getting the error invalid qualifier on this line. im thinking its cause the db is looking for combovar not what the varaible is storing.
    any suggestions?
    Jim
    try me.controls(ComboVar).RowSourceType = ...
    or application.forms(<FormName>).controls(ComboVar).R owSourceType = ...

  3. #3
    Join Date
    Aug 2002
    Posts
    17
    hi,

    try:

    Me.Controls(ComboVar).RowSourceType = "Table/Query"

    thomas

  4. #4
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Re: help with call functions and varaibles

    Originally posted by JDionne
    i have a call function that uses a varaible. the varaible is used to hold the name of an object on the form ie

    Sub ComboVar(ComboVar As String)

    ComboVar.RowSourceType = "Table/Query"


    im getting the error invalid qualifier on this line. im thinking its cause the db is looking for combovar not what the varaible is storing.
    any suggestions?
    Jim
    thanx for the help...i scowered microsoft and found the answer

    if i declare the varable "as combobox" it works great

    ie

    Sub ComboVar(ComboVar As combobox)

    ComboVar.RowSourceType = "Table/Query"

    thanx for all the help
    Jim

Posting Permissions

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