| dbEditDropFlds | dbFilterDropFlds |
Enable user to turn an Edit or Filter input box into a drop down select box. Data source can be either via a manual list or from a DB column returned from a query. Detail control like Nulls and Blanks are also provided.
| Property Syntax |
Obj.dbEditDropFlds="(;,/+|)"DropField, ConnectString, TableName, FieldName, Criteria, AddNull1, NOBLANK/Radio, Dsize, SelectDistinct;...Repeat
Obj.dbFilterDropFlds="(;,/+|)"DropField, ConnectString, TableName, FieldName, Criteria, AddNull1, NOBLANK/Radio, Dsize, SelectDistinct; ...Repeat
| Parameters |
|
Parameters |
Description |
| (;,/+|) | ;=Group ,=Field /=User +=dat |=Manual Drop (MI|Michigan/AZ|Arizona) |
| DropField | The field to implement the drop down. |
| ConnectString | Data source connect String.
When blank, use existing connection. DSN=NWIND or MDB=d:\DB\NWIND.MDB or DAT=server,Database,UID,PWD |
| TableName | Name of table furnishing the columns for drop down. |
| FieldName | If UserConnectString and TableName are blank and
FieldName is not, then FieldName will be a user drop field. e.g. -> X.dbFilterDropFlds = "Name,,,John/Mark/Frank" In order to have a blank in the user drop down,it must be the first. So /John/Mark/Frank will produce a blank. |
| Criteria | If TableName and FieldName are blank, then Criteria is the
complete query if not blank. e.g. -> X.dbEditDropFlds = "car,,,,select car from carspecs where car like 'a%',AddNull" If Criteria is blank then DropSQL = "SELECT " & SelectDistinct & " " & FieldName & " FROM " & Tablename & " WHERE " & FieldName & " IS NOT NULL" |
| AddNull | A Null choice will be added to the "top" of the drop box. The word "ADDNULL" |
| NoBlank / Radio | Select Box will not include a blank entry. default=false (have a blank). The word "NOBLANK". A special Case - Put the word 'Radio' in this slot will allow a Radio selection instead of a dropdown box. If that is the case, make sure the SELECT statement is DISTINCT ! |
| Dsize | Number of rows of the select box. |
| SelectDistinct | This parameter is placed after the word SELECT in the query. If the last param is "DISTINCT", it'll select the drop field with SELECT DISTINCT. Default is not distinct. In case of ACCESS, the DISTINCT will sort and create an bad order. For example - <100, 100-200, 200-300, >300 will have the >300 after the >100 if this parameter is DISTINCT. |
| Example |
|
<% Set e=Server.CreateObject("ASP.DB") e.dbQuickProps="5;NWIND;employees;both;4,auto,lightgreen" e.dbGridDisplayFlds="0,1,2,3,4,5" e.dbEditFlds="0,1,2,3,4,5" e.dbEditDropFlds="lastname,mdb=e:\vdata\nwind\biblio.mdb,authors,author,select author from authors where author like 'm%'" e.dbEditParams="Tablename=authors, editbookmarkflds=0" e.dbNavigationItem="Next,Prev,Top,Bottom,Edit" s = s & zMemoText & ",Memo" e.dbUserLocalText=s e.ASPDB %> |
| Example - Drop Fields Control |
- While drop fields locked in the pre-selected
values for users as a convenient aid. There are occasions that these drop fields
are not desired and user would like to turn it off. By default a "Drop List
Toggle" button is displayed when drop fields are present in the filter
screen. This button is supplied in the ASPdb Package. You can change this button
by specifying the DropButton keyword in the dbFilterParams property. The one
requirement is that you must specify the dbImageDir property to identify the
location of the drop button. The reason for using an <HREF> and not a
<INPUT TYPE=SUBMIT> for this drop field control is due to the customer
validation feature. If the Drop Control button is of type <SUBMIT>. it
will activate the validation routine once clicked which will then destroy the
validation.
| <% Set X=Server.CreateObject("ASP.DB") X.dbQuickProps="1;NWIND;orders;Both;;;;ACCESS;5" X.dbNavigationItem="Top,bottom,next,prev,filter,edit" X.dbEditParams="Tablename=orders, bookmarkFlds=0" X.dbFilterDropFlds="0,,Orders,OrderID" X.dbEditDropFlds="0,,Orders,OrderID" X.dbImageDir="images/" X.ASPDB %> |

