On 1/12/06 8:34 PM, "liamlambert" <[EMAIL PROTECTED]> wrote:
> I am trying to tidy up this code with repeat but haveing trubble > This works fine > get field "name1" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "phone" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "child" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "adult" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "total" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "credit" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "paymenttype" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "address" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "address1" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "address2" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "email" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "seatNo" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "ticket" > put "'" & cleanSQL(it) & "'" & "," after tRowData > get field "showID" > put "'" & cleanSQL(it) & "'" after tRowData > > this does not > > get field > "name1,phone,child,adult,total,credit,paymenttype,address,address1,addre > ss2,email,seatNo,ticket,showID" > put it into tColData > repeat with i = to number of items in tColData > put "'" & cleanSQL(it) & "'" & "," after tRowData > end repeat That's because you can't refer to fields that way. Also, "repeat for each" in this instance is easier than "repeat with i". Try this (watch line wraps): put "name1,phone,child,adult,total,credit,paymenttype,address,address1,address2, email,seatNo,ticket,showID" into tFieldNames repeat for each item tField in tFieldNames put "'" & cleanSQL(field tField) & "'" & "," after tRowData end repeat HTH, Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] PS: If 'field tField' doesn't work, use 'the text of field tField'... I'm pretty sure the first works, but this is all off the top of my head... _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
