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!

Using Script and Form

Status
Not open for further replies.

lemonjuice

Programmer
Jun 12, 2003
62
ZA
Is it posible to call a script from a form and place values in a listbox(on the form) from within the script? If so, how will i do that?
 
Make a table to hold the values you want in the list. In my example the table is called myListValues.db and it has one field called listofstuff, which has several records. Each record contains one value for my list, for example:

listofstuff
-----------
red
blue
green
orange

The following code opens the form and populates the list, and can be placed in a script.

Code:
var
myForm	form
endvar

myForm.open(":work:LJsForm")
myForm.#List6.datasource="[:work:myListValues.listofstuff]"

#List6 is name of the list object in the combo or list field (yours will be different - leave the default, don't rename it).



Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
But how would you populate the listbox one list item at a time? What if the form is already open?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top