Last solution was creating a ghost record. The following code works. Current record and children record are successfully deleted and no new record is created.
Private Sub CmdDelBSR_Click ()
On Error GoTo Err_CmdDelBSR_C lick
Dim strSQL As String
DoCmd.SetWarnin gs (False)
If MsgBox("You are about to delete bsr " & Me.BSR_ID & "and all its associated price plans and offers. Do...
User Profile
Collapse
-
Solved it....
Private Sub CmdDelBSR_Click ()
On Error GoTo Err_CmdDelBSR_C lick
Dim strSQL As String
DoCmd.SetWarnin gs (False)
strSQL = "delete from bsr_offers_T where bsr_id = " & Me.BSR_ID
DoCmd.RunSQL strSQL
strSQL = "delete from bsr_price_plan_ T where bsr_id = " & Me.BSR_ID
DoCmd.RunSQL strSQL
strSQL = "delete from bsr_attachments where...Leave a comment:
-
To Clarify, the code is behind a command button on a multi page form that has sub forms tied to other table records based on BSR_ID. Any help? I must be missing something simple. Thank you.Leave a comment:
-
Thank you! Thank you! It's the simple things I don't know about that trip me up.
Works like a charm, much appreciated.Leave a comment:
-
problem deleting current record (Access 2003)
Access 2003:
The following code is intended to delete the current record and all child records but results in an error, help please, thx.
Private Sub CmdDelBSR_Click ()
On Error GoTo Err_CmdDelBSR_C lick
Dim strSQL As String
DoCmd.SetWarnin gs (False)
strSQL = "delete from bsr_offers_T where bsr_id = " & Me.BSR_ID
DoCmd.RunSQL strSQL
strSQL = "delete from bsr_price_plan_ T... -
how do I prevent a new record when tabbing through fields?
MSAccess 2003:
Users tab through the data entry fields on a form, and accidently tab to the next record thereby erroneously inserting a record. What can I code in the Form_BeforeInse rt to prevent the insert from happening?
Private Sub Form_BeforeInse rt()
If MsgBox("Do you want to save the new BSR record " & Me.BSR_ID & " and all associated offers and price plan?", vbYesNo)...
No activity results to display
Show More
Leave a comment: