Hi folks
I wonder if anyone can help me (a newbie) with a question. I've got a form and it has a button on it next to a field called Younionize_ID. The idea is that when you click the button it takes you to another form (called Communications), and then to the particular record where the value of ID is the same as the value that was in the Younionize_ID field. The values are both defined as General Number.
To do this I have modified a bit of script which is working fine in a couple of other places (though for text values).
The code that I'm having the problem with is:
Private Sub Younionize_Rep_Click()
DoCmd.OpenForm "Communications", acNormal, , "[ID]='" & Me![Younionize ID] & "'", acFormEdit, acWindowNormal
End Sub
What I get when I click the button is:
Runtime Error 2501
The OpenForm Action was cancelled.
I've done everything I can to debug, which is admittedly not a hell of a lot. Any ideas????
I wonder if anyone can help me (a newbie) with a question. I've got a form and it has a button on it next to a field called Younionize_ID. The idea is that when you click the button it takes you to another form (called Communications), and then to the particular record where the value of ID is the same as the value that was in the Younionize_ID field. The values are both defined as General Number.
To do this I have modified a bit of script which is working fine in a couple of other places (though for text values).
The code that I'm having the problem with is:
Private Sub Younionize_Rep_Click()
DoCmd.OpenForm "Communications", acNormal, , "[ID]='" & Me![Younionize ID] & "'", acFormEdit, acWindowNormal
End Sub
What I get when I click the button is:
Runtime Error 2501
The OpenForm Action was cancelled.
I've done everything I can to debug, which is admittedly not a hell of a lot. Any ideas????