Delete Button on a form

  • Thread starter Thread starter stephen.belyea
  • Start date Start date
S

stephen.belyea

The title for this may be a little simpler than the problem I'm trying
to explain.

In my database, I have:

tblPCName
PCNameID (autonumber)
PCName (text)

tblPCName.PCName is the source for the combobox of another field in a
different table (tblPC.PC) which is related to a number of tables.

Is there a way that I can configure a delete button to not only delete
the PC from tblPCName.PCName (and remove it from the combobox list)
but also delete that PCName from all of the records in the database as
well?

Thanks in advance - this newsgroup has been a tremendous resource for
me so far (I've figured out how to do a search box, many to many
relationships, etc. :-D).
 
I would hope that you're storing PCNameID in your other table, not PCName.
If you're storing PCName, you should modify your table to store PCNameID
instead.

If you set up referential integrity with cascading delete (in the
Relationships window), deleting the record from tblPCName should delete
corresponding records in other (related) tables as well, with no additional
action required on your part. You will need to requery the combo box,
though.

Carl Rapson
 
Back
Top