Roz Clarke
roz.clarke at donnslaw.co.uk
Tue Jul 1 11:08:05 CDT 2003
Hi Mark Thanks for the answer... you've lost me though I'm afraid. I'm not sure what you are describing or how it relates to my problem. I'm acquiring the data from the calling control, which could be on any form in the database; could be a main form, could be a subform, could be a sub-sub-subform. I can use Screen.ActiveControl to get the control, and the Parent property of the control will tell me what form it's on... after that I'm stuck. I suppose I could iterate through the results of the Parent property looking for the parent form's parent until I run out of parents?! I want to save the data either in my pop-up form; the form called by this process (it's done with a shortcut menu), or in the control that called it, once the data has been returned. It doesn't really matter which, because whilst they have that text zoomed for editing, they can't do anything else - it's a modal form with just the one control on it. I don't want to make any of the other forms modal though, as the user will need to cross-refer between forms all the time. Hmmm... R. -----Original Message----- From: Mark L. Breen [mailto:subs at solution-providers.ie] Sent: 01 July 2003 15:12 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Calling control (WAS How do I determine which form called?) Hello Roz, I did exactly what Charlotte describes below. I called it 'CallingForm'. It works well once you get it set up. I also used all modal forms but turned them invisible when they called a subform. So the user only ever sees one form. But magically (as far as the programmer is concerned) they turn back on in sequence. The temptation is to hardwire the turning on and off, but that makes the system much less flexible. I am not sure where you will have to acquire the data and where it will be saved to the db, you seem to be suggesting that you will acquire at form three, but will save it at form one. I presume that if you get the calling form working, you will just pass the data back along with it. I cannot remember exactly which way I did it, but if you want anymore info, just shout, I guess you will have no difficulty. Regards Mark ----- Original Message ----- From: Roz Clarke <mailto:roz.clarke at donnslaw.co.uk> To: 'Access <mailto:accessd at databaseadvisors.com> Developers discussion and problem solving' Sent: Tuesday, July 01, 2003 9:18 AM Subject: [AccessD] Calling control (WAS How do I determine which form called?) This is interesting. I need to do something sort of similar... I have an unbound text box on an unbound form which I want to use to display memo fields that are too small to display all their data in the controls on my main forms. To get the data out is easy - screen.activecontrol will do it. But then if they amend the data I need to get the new string back into the right control on the right form. Trouble is it could be up to 3 layers deep on subforms and as far as I can tell, to get the data back in I need to build a full reference to the calling control e.g. Forms!frmLevel1!frmLevel2.form!frmLevel3.form!ctrlCalling Does anyone have an idea of how I could do this when I don't know how many forms are involved??? TIA Roz -----Original Message----- From: Charlotte Foust [mailto:cfoust at infostatsystems.com] Sent: 30 June 2003 18:13 To: Access Developers discussion and problem solving Subject: RE: [AccessD] How do I determine which form called? I make CalledFrom a property of my forms. Then I can pass the calling form's name in the OpenArgs string and let the called form populate its own property. When I close the called form, it checks its CalledFrom property and goes back to that. In 2002 you can do this with Reports as well. Charlotte Foust -----Original Message----- From: Hale, Jim [mailto:jim.hale at fleetpride.com] Sent: Monday, June 30, 2003 6:04 AM To: 'Access DatabaseAdvisors (E-Mail)' Subject: [AccessD] How do I determine which form called? Does anyone have a function that will allow a class to determine which form called it? TIA Jim Hale _____ _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030701/00d3f45c/attachment-0001.html>