Greetings all,
I'm working on a database that has a series of forms (FormA, FormB, FormC, FormD). Each time I click a button on one form, it opens the next and moves the original form to the corner of the screen using DoCmd.MoveSize. I did this for purely aesthetic reasons: instead of minimizing the forms or making them invisible, I organize them off-center so their captions show.
Then someone challenged me to return those forms to their original position on the close of the previous form (again, for purely aesthetic reasons). And here is where I ran into some trouble: the DoCmd.MoveSize can be applied to a button click or OnOpen, but that's for the current form. What I was hoping to do was find a way to click a button on FormB that would tell FormA to move to another position/size. Is this feasible?
I messed with the SetFocus command but couldn't make it work. I even rigged it so that on the close of FormB, it closed FormA too and then immediately re-opened FormA (which has its own particular DoCmd.MoveSize parameters OnOpen); however, that only worked when toggling between two forms: remember, if OnClose of FormC, FormB closes and reopens, and if OnClose of FormB, FormA closes and reopens, then, in cascading fashion, the close of FormC will close FormA and reopen it according to its own OnOpen position/size. Besides, that's not what I really want to happen.
Any ideas?
andy
I'm working on a database that has a series of forms (FormA, FormB, FormC, FormD). Each time I click a button on one form, it opens the next and moves the original form to the corner of the screen using DoCmd.MoveSize. I did this for purely aesthetic reasons: instead of minimizing the forms or making them invisible, I organize them off-center so their captions show.
Then someone challenged me to return those forms to their original position on the close of the previous form (again, for purely aesthetic reasons). And here is where I ran into some trouble: the DoCmd.MoveSize can be applied to a button click or OnOpen, but that's for the current form. What I was hoping to do was find a way to click a button on FormB that would tell FormA to move to another position/size. Is this feasible?
I messed with the SetFocus command but couldn't make it work. I even rigged it so that on the close of FormB, it closed FormA too and then immediately re-opened FormA (which has its own particular DoCmd.MoveSize parameters OnOpen); however, that only worked when toggling between two forms: remember, if OnClose of FormC, FormB closes and reopens, and if OnClose of FormB, FormA closes and reopens, then, in cascading fashion, the close of FormC will close FormA and reopen it according to its own OnOpen position/size. Besides, that's not what I really want to happen.
Any ideas?
andy
Comment