D
davea
Hi
I have a command button that when clicked deletes certain records from
a subform based on an application number being equal. It deletes all
records with the same applciation number as currently shown on the
main form, see code below:
DoCmd.RunSQL ("DELETE FROM tblAdultDetails WHERE
[frmAdultDetails2].Form![ApplicationNum]=" +
Str(Me.ApplicationNumber))
However I would like it to only delete records if the fields
[MainApplicantFlag] =1 or [PartnerFlag] =1 as well as ApplicationNum
being equal. These are both number fields btw.
Can someone tell me what I should add to my code in order to do this?
I'm not sure of the syntax.
Thanks
I have a command button that when clicked deletes certain records from
a subform based on an application number being equal. It deletes all
records with the same applciation number as currently shown on the
main form, see code below:
DoCmd.RunSQL ("DELETE FROM tblAdultDetails WHERE
[frmAdultDetails2].Form![ApplicationNum]=" +
Str(Me.ApplicationNumber))
However I would like it to only delete records if the fields
[MainApplicantFlag] =1 or [PartnerFlag] =1 as well as ApplicationNum
being equal. These are both number fields btw.
Can someone tell me what I should add to my code in order to do this?
I'm not sure of the syntax.
Thanks