PDA

View Full Version : Transfer Calcs to new form


ABC123

fairviewcomputing
03-21-2005, 08:26 AM
I have a set that a data input form is attached to. I added a table to the set so I could use information from the added table on the form. When I tried to add the field, it wasn't there because the new table wasn't part of the set when the form was generated. I then copied the form, attached to the new set but then the calculations related to the original form did not get transferred to the new form. I tried to copy them using copy/paste but kept getting errors (field not recognized). There are 24 complex calculations and I hate to think of retyping them all. Many of the calcs depend upon other calcs so I can't transfer them one at a time without getting errors. How can I get the new form to recognize the calcs used on the original form?

Stan Mathews
03-21-2005, 09:10 AM
You can cut and paste calculated fields (name and expression) from the form calculated fields definition dialog much like you would in a spreadsheet.

Al Buchholz
03-21-2005, 10:08 AM
Howard

It also sounds like you took a set, added a table, and then saved as a new setname.

It is possible, but not always the right choice, to add the new table to a set and save it - as the original name.

Then all the transferring is not necessary.

Or do you really need another set with an additional table in it along with the original set without that table in it?

fairviewcomputing
03-21-2005, 01:08 PM
I will probably end up doing cut/paste but so many of the calcs depend on other calcs that they won't save when I paste them because the one(s) they depend on have not been pasted yet and I get an error message "not found". I guess I will have to cut/paste the "lowest common denominator" first and work up from there. In other words, paste the ones with no dependencies first. That means analyzing all 24 of them and that's what I was trying to avoid. Thanks for your response.
Howard

fairviewcomputing
03-21-2005, 01:11 PM
Al,
No, I just added a table to the original set but when I go to form design to add a field, the added table does not show in the list of tables from which to select fields. I do not need the "old" set once I have the form working with the new one. Thanks for your response.
Howard

Stan Mathews
03-21-2005, 01:20 PM
Like you would in a spreadsheet......

multiple lines of calculated fields can be cut and pasted at the same time, which should do away with the precedence problem. Drag down the list from left of top left corner down the list to the end.

Example of multiple fields selected attached.

fairviewcomputing
03-21-2005, 01:42 PM
I tried that previously and when I pasted it I got an error "Field not found". I tried it again after reading your response, got the same error but ignored it and so far it looks like it will work. Need to put in some "live" data to check it out. Thanks
Howard

Al Buchholz
03-21-2005, 02:35 PM
Howard

Something is wrong - it shouldn't work that way. Once you add a table to a set it should be available in for a form.

I've tried a few different ways that I know of to add a field and they all show the new table(and it's fields) that I added to a set.

What is the keystroke by keystroke detail that you are doing?

And/or can you post an example of a set that doesn't work properly?

Thanks
alb

Stan Mathews
03-21-2005, 03:44 PM
Depending on how you changed the set structure you may need to alter the calculated field expressions as any table reference which is not the parent must be preceeded with

tablename-"

fairviewcomputing
03-22-2005, 04:02 AM
Al, it would be difficult to remember every step I took. I must have done something wrong. Here's a description of what I tried to do.
The original set was my payroll "hours" table with a link to the "employee" table. I needed some information from the "yeartodate" table so I could determine if the FICA limit had been reached. I attached the yeartodate table to the original set, linking it by Soc. Sec. number, just as the employee table was linked.
I then tried to add the yeartodate social security amount field to the form but when I placed a blank field on the form the drop down list did not show me the yeartodate table. That's when the trouble started. I then decided that I must need to duplicate the form, whick I did. I could then add the yeartodate field but the calculations did not duplicate along with the form. When I used cut/paste I got an error "field not found" and at that point I gave up for a while. After receiving some help from the forum I went back and cut/pasted again, this time ignoring the error and it appears that it is working as I hoped but I still need to do some testing to verify it. As I said earlier, I must have goofed from the very beginning but don't know what I did wrong. Thanks very much for your help.
Howard