drop-down list box help

Hi

I have just started to learn VBA. I am programing within Great Plains.

Does anyone know how to turn a normal input field to a drop-down list box. I have been looking in all the VBA help and manual and cannot find the answer. I can put a drop-down list box on my screen but cannot add any data to the list or find how to associate it with the original field I replaced.

Can any one help.

Thegibbons

Comments

  • [b][red]This message was edited by KhalilDutch at 2002-12-11 13:7:9[/red][/b][hr]
    [b][red]This message was edited by KhalilDutch at 2002-12-11 13:6:27[/red][/b][hr]
    : Hi
    :
    : I have just started to learn VBA. I am programing within Great Plains.
    :
    : Does anyone know how to turn a normal input field to a drop-down list box. I have been looking in all the VBA help and manual and cannot find the answer. I can put a drop-down list box on my screen but cannot add any data to the list or find how to associate it with the original field I replaced.
    :
    : Can any one help.
    :
    : Thegibbons
    :
    :

    Hi,

    A few hints:
    to fill a list item in a dropdownlist
    [code]
    Droplist.AddItem ("Item")
    [/code]
    Use this in a loop to sequentially fill it.
    If you've put the property .sorted to True then the items added in de list will be automatically sorted.

    If you want to fill the dropdownlist again (with new data), you'll have to clear it:
    [code]
    Droplist.clear
    [/code]

    To add data from an inputbox to a droplist:
    [code]
    strAnswer=inputbox("Give Answer","Question")
    if Trim(strAnswer)<>"" then 'only fill if answered
    Droplist.additem (strAnswer)
    [/code]

    The textbox on an inputbox can't be changed in an droplistbox.
    If you want to have this you have to create a custom form...

    Hope this pushes you in right direction, if not then please specify your question.

    --KhalilDutch--




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion