LarryDeLaruelle
Technical User
I have a couple of subforms in Continuous view with a comments field. The comments field display is small so I want to give the users a double click event that will open a simple edit form with a text field for editing. The user can then edit or add to existing comments and, On_Close, the contents of the text field are passed back to the calling form.
I have done this before using explicit references to the calling form and it works well. In that case, I have only one subform to deal with. In this case I have two subforms where I want to use this and, rather than create two separate edit forms, I want to pass the subform and field names to a common edit form and can't seem to get it to accept the passed value.
I give the full reference of the form/field name as an OpenArg of the DoCmd.OpenForm as:
"Forms!MainForm!SubForm.FieldName"
In the General Declarations of the edit form I Dim a ctl (I set it as a form level since I will use it in both the On_Open and On_Close events) and in the On_Open event I set it's value to the open args:
Set ctlCalling = OpenArgs
and I get the error message Object Required (Error 424).
MS Help says, among other things, that I did not provide a valid object qualifier or that I supplied an object qualifer but it isn't recognized as an object.
The first question, I guess, is: am I approaching this in the right way, that is, using a control? If not, what would be the correct way? Or, if this is the correct way to do the job, what is wrong with how I am trying to do it?
Appreciate any input you may have.
Thanks.
Larry De Laruelle
larry1de@yahoo.com
I have done this before using explicit references to the calling form and it works well. In that case, I have only one subform to deal with. In this case I have two subforms where I want to use this and, rather than create two separate edit forms, I want to pass the subform and field names to a common edit form and can't seem to get it to accept the passed value.
I give the full reference of the form/field name as an OpenArg of the DoCmd.OpenForm as:
"Forms!MainForm!SubForm.FieldName"
In the General Declarations of the edit form I Dim a ctl (I set it as a form level since I will use it in both the On_Open and On_Close events) and in the On_Open event I set it's value to the open args:
Set ctlCalling = OpenArgs
and I get the error message Object Required (Error 424).
MS Help says, among other things, that I did not provide a valid object qualifier or that I supplied an object qualifer but it isn't recognized as an object.
The first question, I guess, is: am I approaching this in the right way, that is, using a control? If not, what would be the correct way? Or, if this is the correct way to do the job, what is wrong with how I am trying to do it?
Appreciate any input you may have.
Thanks.
Larry De Laruelle
larry1de@yahoo.com