I think you are very new to SQL and even to VB syntax.
First of all, you should enclose every string or date data in single quotes in SQL.
So even in the query that worked, you should enclose txtinvoice.text also.
"INSERT INTO SALES(docdt,docno) values ('" & Format(DTdocdt.Value, "MM/dd/yyyy") & "','" & (txtinvoice.Text) & "')"
And in switched query, you have to switch the field names too.
"INSERT INTO SALES(docno,docdt) values ('" & txtinvoice.Text & "','" & Format(DTdocdt.Value, "MM/dd/yyyy") & "')"
I think this will help you.
If it solves your problem, mark it as answer.