Hi Please help !
I have a form on which I require several sub forms I have created controls on The sub forms to change the sourceobject of unbound sub forms.
However I am having problems seting the link criteria to come from the previous sub form
It does work when using normal forms and using the following code to open the next form but i cant get it to work on the sub forms any Ideas?
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[POSTCODE]=" & "'" & Me![PostCodeSearch] & "'"
stDocName = "frmSubscriberPostCodeList"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub
Hope this makes sense
I have a form on which I require several sub forms I have created controls on The sub forms to change the sourceobject of unbound sub forms.
However I am having problems seting the link criteria to come from the previous sub form
It does work when using normal forms and using the following code to open the next form but i cant get it to work on the sub forms any Ideas?
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[POSTCODE]=" & "'" & Me![PostCodeSearch] & "'"
stDocName = "frmSubscriberPostCodeList"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub
Hope this makes sense