Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete query causing error 3086

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
0
0
US
I have written a delete query in access 2003 that is giving me a 3086 error. I don't have tables open. I also am only using one table to delete from. So I don't know what else I can do. The table is a linked table.
The error spot is highlighted in green. Any help is appreciated.
Tom

Code:
strSQL = "DELETE " & _
         "FROM dbo_rpt_dat_CSDetail cs " & _
          "WHERE cs.uci = 'JVB' AND cs.rptpd > 372 AND cs.trantype = 1 AND cs.modalid = 6;"
 [GREEN]  CurrentDb.Execute strSQL [/GREEN]
 
No, the table does not have a primary key.

Tom
 
If this is a linked table from SQL Server and you don't have a primary key, you can't edit or delete records.

alternative might be to create a pass-through query to delete the records. However, every table/record deserves a unique/primary key.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top