Hello,
I have the following code in a form with a dropdown menu
--
Private Sub Combo0_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "MaleFrm"
stLinkCriteria = "[MaleAnimalCode]=" & Me![Combo0]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
--
When I run the form I get the following error message >>
"Runtime error 2501 - The openform action was cancelled"
<><><><
Basically what I am trying to do is to use a combo box in that form to select the MaleAnimalCode and based on that to retrieve data from the table 'HeGoats' which I have in the form 'MaleFrm'.
What does that error message mean? How can I fix it?
Thank you for your time
I have the following code in a form with a dropdown menu
--
Private Sub Combo0_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "MaleFrm"
stLinkCriteria = "[MaleAnimalCode]=" & Me![Combo0]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
--
When I run the form I get the following error message >>
"Runtime error 2501 - The openform action was cancelled"
<><><><
Basically what I am trying to do is to use a combo box in that form to select the MaleAnimalCode and based on that to retrieve data from the table 'HeGoats' which I have in the form 'MaleFrm'.
What does that error message mean? How can I fix it?
Thank you for your time