Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve Value From DropDownListBox

Status
Not open for further replies.

FontanaS

Programmer
May 1, 2001
357
US
I have a dropdownlistbox (ddlb_neworg) in a datawindow.
When the user selects a choice and/or types in a choice, how do I retrieve that value?

I keep reading that when the dropdownlistbox loses focus, the value is lost.

I have selecteditem and text functions in the selectionchanged event, but they do not work (look below)

org_value = ddlb_neworg.Text(0)
org_value = ddlb_neworg.SelectedText()

The other problem with the text is that I do not know what index number the user selected so I can't use that one.

THANKS!
 
In the itemchanged() event of your DW:
('pers_gender' is the name of the column whose
value we wish to check)

If string(dwo.Name) = "pers_gender" Then
messagebox("Data",String(data))
End If

 
If it is in the actual datawindow .. GetItemString() or GetItemNumber() etc based on the type of column in the datawindow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top