Cascading/linked list boxes

Actually, it looks like it deletes ALL instances of a particular ProgramID. If contacts #3 and #7 both have program #222, both of those records will be deleted, no matter what record you're on in the form...

My bad, that'll teach me for not fully testing it. The RunSQL line should have read:

Code:
DoCmd.RunSQL ("DELETE from ContactsPrograms WHERE ProgramID = " & Me.ProgSelected.ItemData(var) & " AND ContactID = " & Me.ContactID)

(Posted here for completeness of the thread.)

Tim
 

Users who are viewing this thread

Back
Top Bottom