OpenArgs Compatibility

S

Sarah

I have had some challenges with some code I wrote working in Access 2000.

I read that the OpenArgs parameter does not work for reports in Access 97
and 2000. Is the same true for OpenArgs when opening a form?

Thanks for you help.

Sarah
 
F

fredg

I have had some challenges with some code I wrote working in Access 2000.

I read that the OpenArgs parameter does not work for reports in Access 97
and 2000. Is the same true for OpenArgs when opening a form?

Thanks for you help.

Sarah

No it is not.
Access 97 and Access 2000 do support the OpenArgs argument for forms.
 
K

Klatuu

Fred is incorrect. It is how you use it. Here is a working example in 2000
that was originally written in 97:

Called from frmClientSearch:

DoCmd.OpenForm "frmClientDataEntry", , , , , , strKeyClt

On Open evento of frmClientDataEntry:

If Not IsNull([Forms]![frmclientdataentry].OpenArgs) Then
strKeyClient = [Forms]![frmclientdataentry].OpenArgs
 
F

fredg

Fred is incorrect. It is how you use it. Here is a working example in 2000
that was originally written in 97:

Called from frmClientSearch:

DoCmd.OpenForm "frmClientDataEntry", , , , , , strKeyClt

On Open evento of frmClientDataEntry:

If Not IsNull([Forms]![frmclientdataentry].OpenArgs) Then
strKeyClient = [Forms]![frmclientdataentry].OpenArgs

Sarah said:
Thanks Fred

You seem to have mis-read Sarah's original post, or my response to
her.
She wrote:

I read that the OpenArgs parameterdoes not work for reports in Access
97 and 2000.
My response was:
"No it is not." Meaning it is not true that OpenArgs is not available
to open forms.

My very next line specifically said:
"Access 97 and Access 2000 do support the OpenArgs argument for
forms."
 
K

Klatuu

Sorry, fred, I stand corrected. I did misread your post. My apologies.

fredg said:
Fred is incorrect. It is how you use it. Here is a working example in 2000
that was originally written in 97:

Called from frmClientSearch:

DoCmd.OpenForm "frmClientDataEntry", , , , , , strKeyClt

On Open evento of frmClientDataEntry:

If Not IsNull([Forms]![frmclientdataentry].OpenArgs) Then
strKeyClient = [Forms]![frmclientdataentry].OpenArgs

Sarah said:
Thanks Fred

:

On Tue, 12 Jul 2005 09:15:06 -0700, Sarah wrote:

I have had some challenges with some code I wrote working in Access 2000.

I read that the OpenArgs parameter does not work for reports in Access 97
and 2000. Is the same true for OpenArgs when opening a form?

Thanks for you help.

Sarah

No it is not.
Access 97 and Access 2000 do support the OpenArgs argument for forms.

You seem to have mis-read Sarah's original post, or my response to
her.
She wrote:

I read that the OpenArgs parameterdoes not work for reports in Access
97 and 2000.
My response was:
"No it is not." Meaning it is not true that OpenArgs is not available
to open forms.

My very next line specifically said:
"Access 97 and Access 2000 do support the OpenArgs argument for
forms."
 
Top