error Query is too complex when updating record
Posted on 2007-07-24
It must be early in the morning and I am missing something probably simple.
Dim conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & "'" & TextBox1.Text & "'" & ";Persist Security Info=False"
Dim cmd1 As String = "Select * from Report"
Dim adapter1 As New OleDbDataAdapter(cmd1, conn)
Dim topics1 As New DataSet()
Dim builder1 As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(adapter1)
builder1.QuotePrefix = "["
builder1.QuoteSuffix = "]"
For Each row In topics1.Tables("report").Rows
If aa1 = 102 Then ' variable value from elsewhere
row("Question102") = drCurrent("comment") ' drCurrent("comment") value from other table
If aa1 < 98 Then
row("Question" & aa1) = drCurrent("result") ' result from other table
Last line returns the error - Query is too Complex
All I basically want to do is to update an existing record in Access with VB 2005