N
neenmarie
I have a field in a form that when the data is changed I'd like another form
to open. I have set the 'dirty' event and had no problem when linking the
form with only one field. But, don't know how to write the code with two
fields linked. The code I tried to use follows. Can someone help me correct
it.
Thx much
=============================
Private Sub ECLevel_Dirty(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmECLevelChanges"
stLinkCriteria = "[PN]=" & "'" & Me![PN] & "'" And "[CustPO]=" & "'" &
Me![CustPO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
to open. I have set the 'dirty' event and had no problem when linking the
form with only one field. But, don't know how to write the code with two
fields linked. The code I tried to use follows. Can someone help me correct
it.
Thx much
=============================
Private Sub ECLevel_Dirty(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmECLevelChanges"
stLinkCriteria = "[PN]=" & "'" & Me![PN] & "'" And "[CustPO]=" & "'" &
Me![CustPO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub