I am using the OpenArgs parameter to send a value when using DoCmd.OpenForm:
DoCmd.OpenForm 'frmSetOther', acNormal, , , acFormAdd, acDialog, 'value'
I then use Me.OpenArgs inside the opened form to grab the value. It sometimes sends a Null value instead of the original string. What is wrong?
A very interesting alternative to this ‘openArgs’ argument is to use the .properties collection of the currentProject.allforms(‘myFormName’) object. When you need to pass a value to a form (such as a filter inherited from another control or another form, for example), just add the corresponding property for your form, and add your value to this property.
Example:
The called function will try to update the value of the ‘formFilter’ property of the object. If the property does not exist (err 2455 is raised), it will be added as a new property in the error management code.