create delete query in Access 2000

  • Thread starter Thread starter Fredde
  • Start date Start date
F

Fredde

Hi,

I´m trying to create a query in Access that deletes a row in a table. That
is no problem. But when I click on the execute button I get an error message
saying that the row cannot be deleted since it has relations to other
tables. I know that you can fix this in the Relations maintaince routine in
Tools. But the tables were created with sql and run through a macro (and it
must be that way since this is a task in the course). There must be some
parameter that I have missed when I created the tables. When I look in the
relations routine in my database the reference integrity is grey.

What have I done wrong?

Best Regards
Fred
 
Should the relationships be there? If they should be, are you sure you
should be deleting the data?

Access is trying to help ensure that you won't run into data integrity
problems. If, for example, you've got an invoicing application, and you've
got a relationship between your Invoice table and your Customer table, it's
going to stop you from deleting a Customer if that customer has any
invoices. Deleting the Customer would cause problems with your Invoice
table.
 
They're grayed out because your database is "linked" to the tables in
another location. You could try opening the data tables in Access and
updating the
relationships to "cascade delete".
-Ed
 
Back
Top