HI Guys,
I'm getting an "Object Required " error message with the last part of the code:
Dim strSQL As Variant
strSQL = "DELETE tblQuery.EnQuiryID, tblQuery.RecordId, * " & _
"FROM tblQuery " & _
"WHERE tblQuery.EnQuiryID =" & [Forms]![formQuerymain]![FormQueries]![Text3] And tblQuery.RecordId = " & [Forms]![formQuerymain]![FormQueries]![Text3]"
CurrentDb.Execute strSQL, dbFailOnError
Can anyone see why.
I'm getting an "Object Required " error message with the last part of the code:
Dim strSQL As Variant
strSQL = "DELETE tblQuery.EnQuiryID, tblQuery.RecordId, * " & _
"FROM tblQuery " & _
"WHERE tblQuery.EnQuiryID =" & [Forms]![formQuerymain]![FormQueries]![Text3] And tblQuery.RecordId = " & [Forms]![formQuerymain]![FormQueries]![Text3]"
CurrentDb.Execute strSQL, dbFailOnError
Can anyone see why.