-
DropList
I'm trying to populate a droplist with two values from a DB table. One is the index and the other is name. When a name is selected I need the index value to be saved to the main table. I understand that in order to do this I need to use a Select statement with the dbEditDropFlds property. I'm having problems with the syntax. How to I construct this?
HELP!!
oDB.dbEditDropFlds = "Fld=[fldDeptFKey] ConnStr[] UserData=[] DropCrit=[Select fldPkey, fldDeptName From tblDepartments] AddNull=[] NoBlank=[] DSize=[]"
-
classic or tornado ?
first check out the previous message about droplist. A very vigorous example were given there in how to create select box, drop box etc.
Frank
-
I'm using the Classic version. I searched throught this forum and all the examples and I'm still not finding a good example.
Thanks
-
There is a good example of this in the Classic Example Gallery.
The statement is this:
X.dbEditDropFlds="(;|)ReportsTo||||SELECT EmployeeID, FirstName & ' ' & Lastname as Name FROM Employees ORDER BY FirstName"
Look at Example 1 at:
http://www.aspdbtest.com/examples/EP/
Of course, you should substitute in your own table name and field names.
I hope that helps,
Mark
-