G
Guest
I think you have the position correct, just not the syntax.
DeleteSql = "DELETE * FROM tblPay IN 'C:\RED\Reddy.mdb' " _
& "WHERE tblPay.PayNameID=" _
& [Forms]![frmBSCouponNames]![TxtID]
DoCmd.RunSQL (DeleteSql)
You could also use:
Currentdb.execute DeleteSQL, dbfailonerror
This latter method does not provide warnings indicating the number of
records about to be deleted though.
HTH
Dale
DeleteSql = "DELETE * FROM tblPay IN 'C:\RED\Reddy.mdb' " _
& "WHERE tblPay.PayNameID=" _
& [Forms]![frmBSCouponNames]![TxtID]
DoCmd.RunSQL (DeleteSql)
You could also use:
Currentdb.execute DeleteSQL, dbfailonerror
This latter method does not provide warnings indicating the number of
records about to be deleted though.
HTH
Dale