Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Delete command (Access 2000)

    I have a forn and a subform for clients.The subform describes the visits to the clients.I want to make my delete command perform so, that to delete only when there are no entries in the subform.In my applied example there is an entry for the customer and the comman should not delete it.Can i do it ?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Delete command (Access 2000)

    Activate the Relationships window.
    Make sure that there is a relationship between the clients table and the visits table.
    Double click the join line, and tick the check box "Enforce referential integrity", but do *not* tick the check box "Cascade delete related records". Then click OK.

    You won't be able to delete clients as long as they have at least one visit record.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •