I know I have done this before but today it is just giving me grief.
I have set up a DB with one table and two forms. First form is a list of the table recs, and the second form displays a single rec when the list line is double-clicked.
Fist form uses a query to show the table recs, and the second (detail) form uses the table as the data source with record lock on the edited rec.
The list displays fine, but when I double-click on an entry I get Error '2501', The OpenForm action was canceled.
This is the code I use to open the second form:
I'm using Access 2003 if that matters. The MS Knowledgebase has only one entry for error 2501 which pertains to print drivers. That's not my problem.
Can someone point me in the right direction?
Thanks for any help!
I have set up a DB with one table and two forms. First form is a list of the table recs, and the second form displays a single rec when the list line is double-clicked.
Fist form uses a query to show the table recs, and the second (detail) form uses the table as the data source with record lock on the edited rec.
The list displays fine, but when I double-click on an entry I get Error '2501', The OpenForm action was canceled.
This is the code I use to open the second form:
Code:
s_Form = "frm_People"
s_Cond = "[ID] = '" & LstPeople.Column(0) & "'"
DoCmd.OpenForm s_Form, _
WhereCondition:=s_Cond
I'm using Access 2003 if that matters. The MS Knowledgebase has only one entry for error 2501 which pertains to print drivers. That's not my problem.
Can someone point me in the right direction?
Thanks for any help!