Here is a new wrinkle:
Could I make another layout with no records? When there are changes to the record it is saved in the layout without records. I will be having a new layout each week. Each week's layout is independent of the one before except for about 3 fields.
I don't think the 'new layout each week' idea is a good one. If both layouts are based on the same table & same relationship, the records are there, even if you don't have fields to display them.
A little more info is required about you DB structure and why the fields based on one table need to be copied to a second field.
Regarding the copy/paste....
I would think a simple button labeled "Copy to WPS' with a script attached should do the trick.
Set a variable for each field you need to copy.
Go to the second layout.
Set Field for each field via the proper variable.
Just a calculation on the 2nd layout in each field which equals the reference field from the first layout.
It would appear that you have some confusion between the purpose of a "table" a "field" and a "record". Sounds like you are trying to set up new layouts--probably with a new table for each new layout where you should be creating new records instead.
I am still a little confused about tables/layouts but I don't think that's my problem here.
I have 3 layouts all on the same table.
Layout #1 (Home) has buttons for each football team. When clicked on the layout puts the team into field hmg #1 - #18. When done making picks the member clicks on review picks. This takes them to Layout #2 (WPS) which has all the teams they have selected pasted into Layout #2 (WPS & layout #3 (WPS-1). This is where I have FM going back and forth between layouts cutting and pasting between Layout #1/hmg#1-#18 & Layouts #2/wps#, #3/wps#.
Layout #3 (WPS-1) has other fields I use to track the number of correct picks. It works well. I used calculations and it was very easy to set up.
Once the teams have been reviewed the member clicks on submit and FM clears all the picked teams in Layout #1/hmg #1-#18.
I have tried to get a script trigger working so that when "Home" layout is opened it will go into the script Phil helped me with. It is the find mode/set field etc. But it doesn't seem to work so I have added that script to the review button. Which works fine.
I will use a new layout every week. So I was wondering (and this is were I get confused) maybe I should start another Table/layout. When the member makes their picks it goes to the new Table/layout and creates a new record. If I do this I would need to make a relationship between the two tables and their fields. I could do another Table/Layout with teams and have one layout per week with the game schedules. There are just so many possible ways to do this. I need to land on one. I hope you guys can help me brainstorm and figure out the best one.
Here is what I am thinking when it comes to Tables/Layouts. A table can have many layouts. Each field is part of the table and may or may not be part of a layout. Do I have it guys?
I have 3 layouts all on the same table.
Then you do not need to copy data from one layout to another. The data entered on one layout will be directly accessible from any of these three layouts. No need to flip back and forth between layouts.
But it's also possible that your 3 layouts should not be all on the same table too.
I tried the set field, which is how Phil helped me with the find record. It works and is quick. I think I'll get this working and posted in a few days.
Thx to both of you for the suggestions
I kinda agree about different tables but are you suggesting all three be on different tables?
I was thinking of making the weekly game schedules on a table.
Now I'm wondering about the WPS (Weekly Pick Sheet). I need a new one each week with the total correct picks. I don't know if I should just copy the same layout 17 times, one for each week. I would have to make new fields on each layout so the changes from one week will not effect the others. I also want members to be able to make picks ahead and not be seen. Any suggestions on how to solve this problem?
Well, so much for having this done soon.
I am simply making observations about your database based on extremely limited information. I have no idea if you need more than one layout let alone know enough to suggest whether or not you need more than one table.
You should not need a different layout for each week. You should be able to use just one layout for all weeks by pulling up a different record or group of records for each week's data.
So you are saying if I make all the members a group and then make 17 groups I could use the same layout over and over?
I have the setfield working but, there is a bit of a problem (of course):
If I do picks for Bank Shot of "A" for each team and "99" points when I run the script it works. But, when I go back and input picks for Apple of "B" and "10" points it will put "A's and 99" in the picks for Apple. In other words it is using the picks for the first member again. It finds the correct member but uses the wrong picks. I have tried adding a clear command for each field but it hasn't helped.
I'm attaching the script.
I am simply making observations about your database based on extremely limited information.
I simply do not have nearly enough information about what you are trying to do with your database and what you have currently set up to post any additional suggestions.
You have been a lot of help.
I have fixed my problem. Maybe you know why this happened. I was setting a field using the calculation like you told me about. The problem with this one is, even though, it is the same field it is only changing on one layout.
If you look at the script above you can see set field [MFC::WPS#1; MFC::HmG1]. Field WPS#1 is on two layouts, same table. I thought if you changed a field it changed on all layouts. Was I wrong?
I just had to ask. This seemed odd to me.