Open a form with the same ID

G

Guest

I have a Phone list that I would like to set it up so the user could just
click on the name and it will open a form that has the record for that name.
Here is the code that Im using.

Private Sub POC_Name_Click()
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Processing_List Fm"

stLinkCriteria = "[PL-Key_ID]="" & Me![PL-Key_ID] & """
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_ind_ssn_DblClick:
Exit Sub

I get a Run-time error '2501':

The OpenForm action was canceled.
The debuger stopes on the DoCmd.OpenForm stDocName, , , stLinkCriteria Line.
The PL-Key_ID is a number.

I use this on a form that uses SSN's but the SSN's are text and it works.

Any ideas??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top