ivonsurf123
Registered User.
- Local time
- Yesterday, 18:52
- Joined
- Dec 8, 2017
- Messages
- 69
Hello,
Hope you can give some ideas, because I have tried to find one and no success.
I have to Subforms (A, B): I have data on SubForm A I want to pass to Subform B but this is how:
1) SubForm A I have a combo box which filter the data I wan to pass to SubForm B
2) after filter data in SubForm A, It has a button same SubForm A when click will open SubForm B, but also I want to pass that filter data too as new record to complete the rest of the blank fields in Subform B.
I have tried with Open args, MasterField ID, child field ID, but did not work. Can you bring me some ideas how to execute this action, please? I open a prior post but the approach was wrong I was referring to Forms when actually they are SubForms.
this is my open args:
SubForm A
SubForm B
Error Message:
Run time error 94
Invalid use of Null
Many Thanks!
Hope you can give some ideas, because I have tried to find one and no success.
I have to Subforms (A, B): I have data on SubForm A I want to pass to Subform B but this is how:
1) SubForm A I have a combo box which filter the data I wan to pass to SubForm B
2) after filter data in SubForm A, It has a button same SubForm A when click will open SubForm B, but also I want to pass that filter data too as new record to complete the rest of the blank fields in Subform B.
I have tried with Open args, MasterField ID, child field ID, but did not work. Can you bring me some ideas how to execute this action, please? I open a prior post but the approach was wrong I was referring to Forms when actually they are SubForms.
this is my open args:
SubForm A
Private Sub cmd_AddApplicant_Click()
DoCmd.OpenForm "Subfrm_B", , , , acFormAdd, , Field1 & "|" & Field2 & "|" & Field3 & "|" & Field4
End Sub
SubForm B
Private Sub Form_Open (Cancel As Integer)
Dim varSplitString as Variant
varSplitString = Split (Me.OpenArgs, "|")
Me.Field1.value = varSplitString(0)
Me.Field2.value = varSplitString(1)
Me.Field3.value = varSplitString(2)
Me.Field4.value = varSplitString(3)
End Sub
Error Message:
Run time error 94
Invalid use of Null
Many Thanks!