Me.OpenArgs question

jeremypaule

Registered User.
Local time
Today, 17:48
Joined
Aug 21, 2006
Messages
135
I’m looking through a database someone else made and in the code “Me.OpenArgs” is used quite often. I always thought the “Me. “dealt with an object on the form, but there isn’t any kind of OpenArgs object on the form. I’ve searched on google and the form for some kind of explaination, but I’ll I’ve found is code containing this so it wasn’t much help. If anyone can explain this to me or if someone can link me to something that will explain this that would be great.
 
Me refers to the Class module attached to the form. Not the form itself.

The OpenArgs property is not visible as it's something sent to the form upon opening from the DoCmd.OpenForm method.

If you look at the optional parameters of that method in the VBA Editor then you will see [OpenArgs] listed. You use it to send information to the form.
 
could you interpret this for me

Code:
If Me.OpenArgs & "" = "" Then
 
jeremypaule said:
could you interpret this for me

Code:
If Me.OpenArgs & "" = "" Then

He's checking if anything has been passed to the form. If it's empty, then he's doing what's next.

It could be better written as:

Code:
If Nz(Me.OpenArgs) = vbNullString Then
 
(6 years later) I'm a newbie on this forum, and a realtive newbie to Access. Is anyone still out there, on this one?

If using the OpenArgs, does one need to specify? In otherwards if I have this command
DoCmd.OpenForm "frmDupes", acNormal, , , , , OpenArgs

Should it automatically pass the parameters that were specified in the DCount that preceded that command on to the form being opened? Ir do I need to re-enter those parameters in some way? I realize I'm being cryptic. I'll be happy to add more info if I find out this thrtead is still open and followed.

THanks!
 

Users who are viewing this thread

Back
Top Bottom