Hey all,
Although I have a general understanding of the openargs property, I'm still confused on if openargs can be used over multiple instances, between multiple forms, in the case that a form is indirectly passing parameters to another form, a couple of forms down the line.
As I have it in the attached database (which is a copy of my actual database with fields renamed for confidentiality purposes), I have three forms.
The user would go from the Switchboard Form, to Form #1 (=frm1), then to Form #2 (=frm2), Form #3 (=frm3), and return back to the Switchboard Form. The idea is that the user would go through a series of forms, entering in data, before returning back to the "main" form. There are buttons that allow the user to go back and forth between forms, should they choose to change a entry later on in the form-filling process.
(I also have autonumbered fields in the tables to denote unique entries, but these do not show up on the forms themselves.)
On the first form, I have the FormID denoted for the overall form (as all of these individual forms are linked through the FormID. I also have a combo box with a variable that should be changing whether or not controls on both frm1 and frm3 are enabled or disabled. This is denoted as "VariableToChange" in the sample database. I also have a field on frm1 that shows the effect of changing VariableToChange -- it enables/disables the second field.
The second form just has a field, right now, for FormID.
The third form is a continuous item form, with a FormID in the corner. FormID has been defaulted to stay exactly the same (as it is not the FK), so I'm confident that I'm recording multiple records from the same form. (This defaulting has been done with the module LastComboRow.)
I want to pass an If-Then statement, triggered by VariableToChange, that would change whether or not specific controls on frm1 and frm3 - but not frm2 - are enabled or disabled.
I found that if I somehow kept both frm1 and frm3 open at the same time (and uncommented the pertinent lines in my VBA), the enabling/disabling worked like a charm. However, the moment I close frm1, I no longer can enable/disable the controls on frm3.
I know that the openargs argument works when there is a button from a calling form to a receiving form -- that is, openargs will automatically load upon that button being clicked and the form loading.
However, in cases, where openargs isn't being immediately used -- but is going to be used a couple of forms into the future -- should we just 'chain' openargs, and make sure that we mention openargs in every button between each form?
I hope that this post hasn't been terribly long/confusing -- I just don't know how to properly work with openargs, and all the sample databases I've seen so far only work with two forms, and not three (or four, or five...).
Thank you in advance!!!!
Although I have a general understanding of the openargs property, I'm still confused on if openargs can be used over multiple instances, between multiple forms, in the case that a form is indirectly passing parameters to another form, a couple of forms down the line.
As I have it in the attached database (which is a copy of my actual database with fields renamed for confidentiality purposes), I have three forms.
The user would go from the Switchboard Form, to Form #1 (=frm1), then to Form #2 (=frm2), Form #3 (=frm3), and return back to the Switchboard Form. The idea is that the user would go through a series of forms, entering in data, before returning back to the "main" form. There are buttons that allow the user to go back and forth between forms, should they choose to change a entry later on in the form-filling process.
(I also have autonumbered fields in the tables to denote unique entries, but these do not show up on the forms themselves.)
On the first form, I have the FormID denoted for the overall form (as all of these individual forms are linked through the FormID. I also have a combo box with a variable that should be changing whether or not controls on both frm1 and frm3 are enabled or disabled. This is denoted as "VariableToChange" in the sample database. I also have a field on frm1 that shows the effect of changing VariableToChange -- it enables/disables the second field.
The second form just has a field, right now, for FormID.
The third form is a continuous item form, with a FormID in the corner. FormID has been defaulted to stay exactly the same (as it is not the FK), so I'm confident that I'm recording multiple records from the same form. (This defaulting has been done with the module LastComboRow.)
I want to pass an If-Then statement, triggered by VariableToChange, that would change whether or not specific controls on frm1 and frm3 - but not frm2 - are enabled or disabled.
I found that if I somehow kept both frm1 and frm3 open at the same time (and uncommented the pertinent lines in my VBA), the enabling/disabling worked like a charm. However, the moment I close frm1, I no longer can enable/disable the controls on frm3.
I know that the openargs argument works when there is a button from a calling form to a receiving form -- that is, openargs will automatically load upon that button being clicked and the form loading.
However, in cases, where openargs isn't being immediately used -- but is going to be used a couple of forms into the future -- should we just 'chain' openargs, and make sure that we mention openargs in every button between each form?
I hope that this post hasn't been terribly long/confusing -- I just don't know how to properly work with openargs, and all the sample databases I've seen so far only work with two forms, and not three (or four, or five...).
Thank you in advance!!!!