J
JohnLute
I've designed what I call a "mini" BOM. I use
sfrmPKProfilesAssociations.cbProfilesAssociations to create Parent/Child
records.
This design is coded so that it also creates a "reverse" record or a
Child/Parent record. Here's
how:
Private Sub cbProfilesAssociations_Change()
Dim v_parent_id As String
Dim v_child_id As String
Dim v_Str_SQL As String
v_parent_id =
Forms!frmPKProfilesTEMPLATE.Form!sfrmPKProfilesAssociations!cbProfilesAssociations
v_child_id = Forms!frmPKProfilesTEMPLATE!txtProfileID
DoCmd.SetWarnings False
v_Str_SQL = "Insert Into tblPKProfilesAssociations Values ('"
v_Str_SQL = v_Str_SQL & v_child_id & "','" & v_parent_id & "')"
DoCmd.RunSQL (v_Str_SQL)
DoCmd.SetWarnings True
End Sub
My objective now is is to select a record in sfrmPKProfilesAssociations and
delete it AND it's "reversed" record. However, I'm a novice when it comes to
coding.
This is a real challenge - any help would be greatly appreciated!
Thanks!
sfrmPKProfilesAssociations.cbProfilesAssociations to create Parent/Child
records.
This design is coded so that it also creates a "reverse" record or a
Child/Parent record. Here's
how:
Private Sub cbProfilesAssociations_Change()
Dim v_parent_id As String
Dim v_child_id As String
Dim v_Str_SQL As String
v_parent_id =
Forms!frmPKProfilesTEMPLATE.Form!sfrmPKProfilesAssociations!cbProfilesAssociations
v_child_id = Forms!frmPKProfilesTEMPLATE!txtProfileID
DoCmd.SetWarnings False
v_Str_SQL = "Insert Into tblPKProfilesAssociations Values ('"
v_Str_SQL = v_Str_SQL & v_child_id & "','" & v_parent_id & "')"
DoCmd.RunSQL (v_Str_SQL)
DoCmd.SetWarnings True
End Sub
My objective now is is to select a record in sfrmPKProfilesAssociations and
delete it AND it's "reversed" record. However, I'm a novice when it comes to
coding.
This is a real challenge - any help would be greatly appreciated!
Thanks!