Ok, here is my dilemma. I have 3 forms in question, RMA Base Form, Parts Transactions (a subform of the RMA Base Form), and frmRejectParts (a form that opens when you click a button on the Parts Transactions subform). When I click a button on the Parts Transactions subform, I need to have the frmRejectParts open and pull two values from the Parts Transactions form (part number, transaction id). I would not think this difficult, and reviewing the faq and forums have found answers on going from one form to the other; however, since I need to pull records from a subform instead of just a main form, I cannot figure how to get frmRejectParts to view the subform. (sorry if this is all confusing!)
Here is the code I am using:
(this is on the Parts Transactions subform, when you click the button to open the frmRejectParts form)
Option Compare Database
Dim strPartNumber As String
Private Sub cmdRejectPart_Click()
If MsgBox("Are you sure?", vbYesNo) = vbYes Then
If Not (IsNull(Me.Part_Number)) Then
strPartNumber = Me.Part_Number
End If
DoCmd.OpenForm "frmRejectParts", , , , acFormAdd
Else
Exit Sub
End If
End Sub
(this is the code for the frmRejectParts)
Option Compare Database
Private Sub Form_Open(Cancel As Integer)
strPartNumber = Me.Part_Number
End Sub
Any help is greatly appreciated. Thanks!
Here is the code I am using:
(this is on the Parts Transactions subform, when you click the button to open the frmRejectParts form)
Option Compare Database
Dim strPartNumber As String
Private Sub cmdRejectPart_Click()
If MsgBox("Are you sure?", vbYesNo) = vbYes Then
If Not (IsNull(Me.Part_Number)) Then
strPartNumber = Me.Part_Number
End If
DoCmd.OpenForm "frmRejectParts", , , , acFormAdd
Else
Exit Sub
End If
End Sub
(this is the code for the frmRejectParts)
Option Compare Database
Private Sub Form_Open(Cancel As Integer)
strPartNumber = Me.Part_Number
End Sub
Any help is greatly appreciated. Thanks!