Hi can someone advise what is wrong with the following - I have fiddled with it and just cannot get it to work.
I began with the wizard linking the [Workstream] and tried to add [Period] - unsuccessfully!
Many thanks
Richard
Code:
Private Sub cmdViewTxns_Click()
On Error GoTo Err_cmdViewTxns_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmKE5ZList"
stLinkCriteria = "[Workstream]=" & "'" & Me![Workstream] & "' and [Period] =" & "'" & Me![Period] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdViewTxns_Click:
Exit Sub
Err_cmdViewTxns_Click:
MsgBox Err.Description
Resume Exit_cmdViewTxns_Click
End Sub
I began with the wizard linking the [Workstream] and tried to add [Period] - unsuccessfully!
Many thanks
Richard