IF NO UPDATE
Esta assim agora:
Conect.Execute ("update tabx set x1 = " & Text1 & ", x2=" & Text2 & ", x3=" & Text3 & ", x4=" & Text4 & ", x5=" & Text5 & ", x6=" & Text6 & ", x7=" & Text7 & ", x8=" & Text8 & ", x9=" & Text9 & ", x10=" & Text10 & ", x11=" & Text11 & ", y1=" & Text12 & ", y2=" & Text13 & ", y3=" & Text14 & ", y4=" & Text15 & ", y5=" & Text16 & ", y6=" & Text17 & ", y7=" & Text18 & ", y8=" & Text19 & ", y9=" & Text20 & ", y10=" & Text21 & ", y11=" & Text22 & ", c1='" & IIf(IsNull(Text23), "", Text23) & "', c2='" & IIf(IsNull(Text24), "", Text24) & "', c3='" & IIf(IsNull(Text25), "", Text25) & "', c4='" & IIf(IsNull(Text26), "", Text26) & "', c5='" & IIf(IsNull(Text27), "", Text27) & "', c6='" & IIf(IsNull(Text28), "", Text28) & "', c7='" & IIf(IsNull(Text29), "", Text29) & "', c8='" & IIf(IsNull(Text30), "", Text30) & "', c9='" & IIf(IsNull(Text31), "", Text31) & "', c10='" & IIf(IsNull(Text32), "", Text32) & "', c11='" & IIf(IsNull(Text33), "", Text33) & "'")
Conect.Execute ("update tabx set x1 = " & Text1 & ", x2=" & Text2 & ", x3=" & Text3 & ", x4=" & Text4 & ", x5=" & Text5 & ", x6=" & Text6 & ", x7=" & Text7 & ", x8=" & Text8 & ", x9=" & Text9 & ", x10=" & Text10 & ", x11=" & Text11 & ", y1=" & Text12 & ", y2=" & Text13 & ", y3=" & Text14 & ", y4=" & Text15 & ", y5=" & Text16 & ", y6=" & Text17 & ", y7=" & Text18 & ", y8=" & Text19 & ", y9=" & Text20 & ", y10=" & Text21 & ", y11=" & Text22 & ", c1='" & IIf(IsNull(Text23), "", Text23) & "', c2='" & IIf(IsNull(Text24), "", Text24) & "', c3='" & IIf(IsNull(Text25), "", Text25) & "', c4='" & IIf(IsNull(Text26), "", Text26) & "', c5='" & IIf(IsNull(Text27), "", Text27) & "', c6='" & IIf(IsNull(Text28), "", Text28) & "', c7='" & IIf(IsNull(Text29), "", Text29) & "', c8='" & IIf(IsNull(Text30), "", Text30) & "', c9='" & IIf(IsNull(Text31), "", Text31) & "', c10='" & IIf(IsNull(Text32), "", Text32) & "', c11='" & IIf(IsNull(Text33), "", Text33) & "'")
Nao cabe na mesma linha se colocar os iif, como faco? Use um _ e pode passar para a outra linha que ele considera como a mesma.
SQL = "update tabx set x1 = " & valsql(Text.text) & ", x2=" & valsql(Text2.text) _
& ", x3=" & valsql(Text3.text) & ", x4=" & valsql(Text4.text) _
& ", x5=" & ...Ou então
SQL = "update tabx set x1 = " & valsql(Text.text)
sql = sql & ", x2=" & valsql(Text2.text)
sql = sql & (...)
conect.execute sqlCitação:The Microsoft Jet database engine cannot find the input table or query 'tabx'. Make sure it exists and that its name is spelled correcly.
Tradução grotesca (sou péssimo)
O Microsoft Jet Database Engine não pode localizar a tabela ou consulta de entrada 'tabx'. Certifique-se que ela existe e que o nome foi escrito corretamente.
Citação:(como faco o debug?)
Vá ao menu View / Immediate Window para exibir a janela do debug
digite
Debug.Print SQL
Para que durante a execução a string seja impressa na janela...
até mais...
é o terceiro topico que abre com esse mesmo problema, não é?
Por favor, poste mais detalhes como:
a) Quais campos está trabalhando?
b) Como está conectando?
c) Quais dados está tentando inserir?
Por favor, poste mais detalhes como:
a) Quais campos está trabalhando?
b) Como está conectando?
c) Quais dados está tentando inserir?
Tópico encerrado , respostas não são mais permitidas