Which error? On which line? One thing for sure, you don't have to put the SET when setting the value of the listfield.
>Hi Winan,
>
>Thanks for your help, but is it possible using datalist object without data object controll, what i mean is build the connection and recordset by command, then link listfield to datalist, how to do it?
>
>I have try to build a connectoin as cn and recordset as rs, then link the table to datalist:
>
>set datalist.rowsource = rs
>set datalist.listfield = fieldname
>
>but it prompt a compile error, is it anything wrong? or datalist only applies to data object controller?
>
>Thanks for your help
>Aston
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com