Elana
Registered User.
- Local time
- Today, 15:47
- Joined
- Apr 19, 2000
- Messages
- 232
I have a form that displays location information that the users can edit. Users can open this form from either one of 2 different forms (search forms). I want the current record of the search form to be the record that shows up on the edit form. The Unique Identifier for each location is the field "ID".
From each search form, I have placed a docmd.openform command on a command button stating "DoCmd.OpenForm "frmLocationEdit", acNormal, , , , , (Me.ID).
Then on the form I'm opening, on the "On Open" Event I place "me.id = me.openargs". Then I get an error message saying "Run Time Error...You can't assign a value to this object", and it points to the OnOpen event code as the problem.
Normally I would just place a filter in the form I'm opening to point to the current record on the search form, but because I want to be able to get at this from from 2 different places, I was hoping to use the OpenArgs.
Can someone please give me an idea of what I'm doing wrong here?
Thanks for reading and responding.
From each search form, I have placed a docmd.openform command on a command button stating "DoCmd.OpenForm "frmLocationEdit", acNormal, , , , , (Me.ID).
Then on the form I'm opening, on the "On Open" Event I place "me.id = me.openargs". Then I get an error message saying "Run Time Error...You can't assign a value to this object", and it points to the OnOpen event code as the problem.
Normally I would just place a filter in the form I'm opening to point to the current record on the search form, but because I want to be able to get at this from from 2 different places, I was hoping to use the OpenArgs.
Can someone please give me an idea of what I'm doing wrong here?
Thanks for reading and responding.