I need to know how to use a For Each/Next loop to delete all records on a subform that have the same values in a field. The subform is a form based on a linking table with both fields combined as the primary key and the field that hold the criteria is the same as the primary key of the main form (I hope that makes sense). I have tried making the field null using the Form!MainForm!S ubForm.Form!Con trol.Value = null for both fields, but it just deletes the first record and then when I leave it, it says I can't leave the primary key field blank. So I think that I have to delete the record.
The fields in the subform are KeyFobSN and BranchNumber. The subform is linked to the main form by the KeyFobSN. Each KeyFob will have many records as each has access to many branches.
The fields in the subform are KeyFobSN and BranchNumber. The subform is linked to the main form by the KeyFobSN. Each KeyFob will have many records as each has access to many branches.
Comment