M
Mik
Hi,
I have a problen with the OpenArgs command after I have converted a database
from Access 97 to Access 2003.
I have a commandline like this
Open_frm "frmMenuMain", acEdit, "=frmMenuMain()"
.. It call the modul Open_frm
***
Function Open_frm(frmName As String, strReadEdit As String, strOpenArgs As
String)
DoCmd.OpenForm frmName, acNormal, , , strReadEdit, acNormal,
OpenArgs:=strOpenArgs
' I have tried with line without any help:
' DoCmd.OpenForm frmName, acNormal, , , strReadEdit, acNormal, strOpenArgs
End Function
***
.. And this is the modul in the form:
***
Private Sub Form_Open(Cancel As Integer)
Dim strForm_Open As String
strForm_Open = Forms!frmMenuMain.OpenArgs
Me.OnLoad = strForm_Open
End Sub
***
And its here the problem comes. Every time it says the "OpenArgs" is
null.....
I don't understand it because I have tried to put some msgbox to verify
and it seems not to be empty
I have tried with this function to verify that there is nothing wrong with
the form:
***
Private Sub Form_Open(Cancel As Integer)
Dim strForm_Open As String
If Not IsNull(Me.OpenArgs) Then
MsgBox "01"
strForm_Open = Forms!frmMenuMain.OpenArgs
Me.OnLoad = strForm_Open
Else
MsgBox "02"
strForm_Open = Me.Name
Me.OnLoad = "=" & strForm_Open & "()"
End If
MsgBox strForm_Open
'strForm_Open = "=frmMenuMain()"
End Sub
****
And that works.
Are the somebody who can help me a little I will say thanks in advance.
Mik
I have a problen with the OpenArgs command after I have converted a database
from Access 97 to Access 2003.
I have a commandline like this
Open_frm "frmMenuMain", acEdit, "=frmMenuMain()"
.. It call the modul Open_frm
***
Function Open_frm(frmName As String, strReadEdit As String, strOpenArgs As
String)
DoCmd.OpenForm frmName, acNormal, , , strReadEdit, acNormal,
OpenArgs:=strOpenArgs
' I have tried with line without any help:
' DoCmd.OpenForm frmName, acNormal, , , strReadEdit, acNormal, strOpenArgs
End Function
***
.. And this is the modul in the form:
***
Private Sub Form_Open(Cancel As Integer)
Dim strForm_Open As String
strForm_Open = Forms!frmMenuMain.OpenArgs
Me.OnLoad = strForm_Open
End Sub
***
And its here the problem comes. Every time it says the "OpenArgs" is
null.....
I don't understand it because I have tried to put some msgbox to verify
and it seems not to be empty
I have tried with this function to verify that there is nothing wrong with
the form:
***
Private Sub Form_Open(Cancel As Integer)
Dim strForm_Open As String
If Not IsNull(Me.OpenArgs) Then
MsgBox "01"
strForm_Open = Forms!frmMenuMain.OpenArgs
Me.OnLoad = strForm_Open
Else
MsgBox "02"
strForm_Open = Me.Name
Me.OnLoad = "=" & strForm_Open & "()"
End If
MsgBox strForm_Open
'strForm_Open = "=frmMenuMain()"
End Sub
****
And that works.
Are the somebody who can help me a little I will say thanks in advance.
Mik