vba - How to break long string to multiple lines -


i'm using insert statement in code in vba excel i'm not able break more 1 line

sqlquerystring = "insert employee values(" & txtemployeeno.value & " _ ,'" & txtcontractstartdate.value & "' _ ,'" & txtseatno.value & "' _ ,'" & txtfloor.value & "','" & txtleaves.value & "')" 

it giving error "expected end of statement". plz help.

you cannot use vb line-continuation character inside of string.

sqlquerystring = "insert employee values(" & txtemployeeno.value & _ "','" & txtcontractstartdate.value &  _ "','" & txtseatno.value & _ "','" & txtfloor.value & "','" & txtleaves.value & "')" 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -