OpenArgs lifespan

I think it would be more accurate to say you were setting a new value in form 2. It wasn't 'letting go' of the value. It was being replaced.


Total newb question: Can an Array be used to carry multiple values through openargs?
 
You've just set yourself your next homework task...:D
 
I think it would be more accurate to say you were setting a new value in form 2. It wasn't 'letting go' of the value. It was being replaced.
Sorry, I am totally lost now. As I have said, the OpenArgs property is “read only,” so it cannot be “replaced.”
 
Sorry, I am totally lost now. As I have said, the OpenArgs property is “read only,” so it cannot be “replaced.”

My answer seemed to make sense at the time I wrote it in the context of my previous reply and Tim's database. Reading it again now, its not clear what I meant

In Tim's database, he is setting the OpenArgs for the following form based on a field value in the current form.
So therefore each new form would have a 'new' OpenArgs value.
That of course doesn't mean that the OpenArgs for the current form would be updated/replaced. That does indeed stay fixed until the form is closed/reopened.

I had previously pointed out that if he used Me.OpenArgs as the criteria for the following form that same value would be carried forward.
 
The ONLY way that I can find in the documentation to set a value for OpenArgs is to set it through the DoCmd.OpenForm method.

All I can tell is that I am passing the expected values from Form1 to Form2 and then different yet correct ones from Form2 to Form3......so it at least appears to be either 1) clearing because I restated the DoCmd.OpenForm phrase or 2) is DoCmd.OpenForm dependent.

This statement is confusing the issue.

In the case I described earlier, where Form1 is opened manually; Form1 opens Form2 and passes "F1" as OpenArgs; and Form2 opens Form3 and passes ""F2" as OpenArgs, there are THREE OpenArgs values floating around.

Using the external-reference nomenclature, Forms!Form1.OpenArgs should be empty. Forms!Form2.OpenArgs should be "F1". Forms!Form3.OpenArg should be "F2".

Using Me.OpenArgs from each form, you get empty, F1, or F2 depending on which form was current at the time you evaluated Me.OpenArgs. But within the constant context of a given form's Class Module, you will ALWAYS get the same answer.

The problem is that Me.OpenArgs is different on each form because ME is different on each form. Zydeceltico, are you confused about what ME means? It changes depending on which form's Class Module contains it. Is that confusing you? Me is NOT absolute; it is relative to your location.
 
Using Me.OpenArgs from each form, you get empty, F1, or F2 depending on which form was current at the time you evaluated Me.OpenArgs. But within the constant context of a given form's Class Module, you will ALWAYS get the same answer.

The problem is that Me.OpenArgs is different on each form because ME is different on each form. Zydeceltico, are you confused about what ME means? It changes depending on which form's Class Module contains it. Is that confusing you? Me is NOT absolute; it is relative to your location.

Hi Doc - No - I don't think I'm confused about "Me". I get that it is relative to the form I am working with at the moment and the underlying Class Module of that form. On the other hand, I think I am somehow not being very clear communicating via typing in my posts. I apologize for that.

As far as this post/thread is concerned, you all have provided me with enough info that I have what I need to work under a couple of different conditions just as I expect it should. So - I may not be able to communicate that very well - but it is working and do I have an understanding of why it is working. I am really grateful for that!

Thanks,

Tim
 
OK, Tim - if you are happy, then great!

And I wasn't attempting to throw some shade about ME being relative. It was just unclear in how you asked that question. So many issues on this form hinge on understanding, and I have been my own worst enemy about how I sometimes choose an odd turn of phrase. Guess that's what I get for being an old curmudgeon.
 
OK, Tim - if you are happy, then great!

And I wasn't attempting to throw some shade about ME being relative. It was just unclear in how you asked that question. So many issues on this form hinge on understanding, and I have been my own worst enemy about how I sometimes choose an odd turn of phrase. Guess that's what I get for being an old curmudgeon.

:-) No Worries! and Thank You. I know for a fact that I don't communicate very well - and I'm "old" with teens and I'm ADD as hell - - so..............lol!

Thank You for your patience with me!
 

Users who are viewing this thread

Back
Top Bottom