Lawrence, Charles, Thanks for your responses. I have decided to do it the safe way and have added the extra column to the table. As long as this doesn't slow things down too much that will be the answer in the meantime.
Regards, John Docherty -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence Lustig Sent: Saturday, 19 March 2005 9:06 a.m. To: RBG7-L Mailing List Subject: [RBG7-L] - Re: Dynamically Changing Table for Forms & Reports > I have a database I use for preparing estimates, which often require > variants of the original estimate to be prepared. Rather than set up a new > database for each variant, or add another column which allows different > variants to be differentiated within the original table, I would like to be > able to copy a table within a database, make some changes to it, and then > use the same forms and reports to access it. This requires the ability to > dynamically change the driving form for tables and reports. Not withstanding the fact that (in my opinion) this is the wrong way to go about it (adding the column would be a better way), you can accomplish what you want by: 1. Use CREATE TEMP VIEW to make a view based on one of your estimate tables. 2. Change all your forms and reports to work off the temporary view. 3. Change your code so that before the form or report is used, the user is prompted to specify which table to use, then recreate the view based on that table. Note that you will not be able to use your forms or reports without first creating the view. A good place to put this code, if it fits in with your overall user interface design, is in the ON BEFORE START eep of the form that edits the estimate. Then you will be assured that anytime the form starts, a view will be created to drive the form. (If you want, in that EEP you can check if the view already exists, and only prompt the user if it does _not_ exist). Then, put your button to print the report on the form -- so that there will always be a view to print from. -- Larry -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 18/03/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.0 - Release Date: 21/03/2005
