RowSource (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


accessman -> RowSource (6/29/2006 0:21:55)

Hi,

I create the the combox in the form.

The Enter Event of the combox is

name.rowsource = "(select 'ALL' From [tbl]) Union (select [Name] from [tbl] Group By [Name] Order By [Name])"

The list solutions are:
Alan
ALL
Amy
Jeff
....
...

Can I put "ALL" in the first postion?

ALL
Alex
Amy
....


Because "ALL" means all the values.
I want to put "ALL" in the first place.

Thanks.




rdouglass -> RE: RowSource (6/29/2006 9:38:15)

quote:

Because "ALL" means all the values.
I want to put "ALL" in the first place.


I sometimes cheat and put a space in front of the 'a' and that frequently will be a good shortcut. However, be aware that using "trim" and other types of functions may make it not work.

The other way is to not list ALL in the query but 'hardcode' it as the first item in the list by writing it before you do the loop to write the options.

That make any sense?




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875