How do I reference the value of a dropdown list control ? Follow

0
Avatar
feirfeir

hi,i have a annoying problem.

bartender 2016

-----------------------------------------------------------

I want to do that:

1.create a data source,called "Data_Name".the data will contains a different product name.For example of the next

  1. pen
  2. rubber
  3. ruler

2.create a drop-down list control,called"DL_Name",and reference "Name".

3.create a drop-down list control again,called "DL_Model",the drop-down list changes depending on the DL_Name selection.

 

i try it:

function NameToModel()

dim a

a=Format.Objects("DL_Name").Value

Select Case a
Case a="pen"
b="P10"
Case a="rubber"
b="R12"
NameToModel=b
End Select
end function

DL_Model   OnFillList

Value=NameToModel()

 

-----------------------------------------------------------------------------------------------------------

problem:
object does not support operation.

why the value of the drop-down list control does not support references???

 

i do not understand the script, I quickly silly.

1 comments

0
Avatar
Christopher Dietz
Comment actions Permalink

Try this:

Set a = Format.objects("DL_Name")

Then use the "A" variable like this:

A.value

 

______________________________________________________________

function NameToModel()

dim a

Set a = Format.Objects("DL_Name")

Select Case a.value
Case a.value="pen"
    b="P10"
Case a.value="rubber"
    b="R12"
NameToModel=b
End Select
end function

______________________________________

Seems pretty sad that many posts go un-answered.

I hope this works.

Please sign in to leave a comment.