The problem is with passing an OpenArgs statement when opening a form. In the new form I initially "seemed to have" fixed the problem by capturing me.openargs value into a variable in the Form_Open event. Now, that is passing as Null... again.
I've tried structuring the calling code directly using me.Name, tried it by setting a string variable to me.Name's value then passing that, even tried various combinations of single and double quotes... just in case.
Here's the calling code:
Expand|Select|Wrap|Line Numbers
- Debug.Print "My name is "; Me.Name
- 'strMyName = Me.Name
- 'call the pop-up to add a new folder name
- DoCmd.OpenForm _
- FormName:=("frmNewFolder"), _
- windowmode:=acDialog, _
- OpenArgs:=Me.Name
''' The print statement above returns My name is frmAssignPermissions
---
In the new pop-up form I was monitoring the value here:
Expand|Select|Wrap|Line Numbers
- Private Sub Form_Open(Cancel As Integer)
- Dim strWhoCalled As String
- Debug.Print Me.OpenArgs
- strWhoCalled = Me.OpenArgs
--
Like I said... it seemed to be working when I crawled home last night.
I rebooted the computer as always.
This morning the problem is present.
... Odd thing is... I had the same problem with the code several days ago and somewhere in fussing with capturing the OpenArgs in the Form_Open event it had gone away. Any thoughts?