local m.xfield for i=1 to 3 do case case i=1 m.xfield="cust_id" case i=2 m.xfield="company" case i=3 m.xfield="address" endcase Text to m.myvar textmerge Noshow sele < < m.xfield > > from home(1)+"samples\data\customer" into cursor ycurs &&cut 2spaces please in brackets sele ycurs brow Endtext messagebox(m.myvar) =execscript(m.myvar) endfornote: brackets are spaced for the ut editor only to make them visible (otherwise interpreted as HTML and rendered as this)-cut 2 spaces before running the code.