I have the following code ... I think it's ok but I'm getting an error: Runtime Error '2501' - The OpenForm action was cancelled.
stDocName = "frm_compare"
stLinkCriteria = "[PD_ID] = '" & Me![PD_ID] & "' And [STREET_ID] = '" & Me![STREET_ID] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
stDocName = "frm_compare"
stLinkCriteria = "[PD_ID] = '" & Me![PD_ID] & "' And [STREET_ID] = '" & Me![STREET_ID] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub