Error 3346: The number of query fields and destination fields are not the same

Private Sub cmdSearch_Click()

If Len(txtSearchString) = 0 Or IsNull(txtSearchString) = True Then
MsgBox "You must enter a search string."

Else

Dim dbs As DAO.Database
Set dbs = OpenDatabase("e:\my documents\appeal.mdb")
Dim SQL As String
GCriteria = txtSearchString
SQL = "INSERT INTO appealtemp" & _
"(caseno, defendent, respondent, fdate, type, cat, perticulars, taluk, village, sno, ono, extnt, deflaw, opplaw) " _
& " SELECT ('caseno, defendent, respondent, fdate, type, cat, perticulars, taluk, village, sno, ono, extnt, deflaw, opplaw" _
& " FROM appeal " _
& " where caseno= GCriteria');"
'send data from sql to message box
'MsgBox SQL
'send data form Sql to database tblFilename.
dbs.Execute SQL

End If
End Sub


pls help me
 

Users who are viewing this thread

Back
Top Bottom