You'll need to limit your layout's found set to just the current record. That will also require changing how buttons for moving from record to record work as they'll need to select that "next" or "previous" record and then isolate it as the new single record in the found set.
The module is a Classroom booking program and there are no buttons per say, that move you forward or back. The little red mouse wheel was an oversight. When you have no field activated in the layout, you can scroll from record to record. Othewise, you are forced to make a decision, SAVE the new record created or delete and go back to the precious window.
The scroll ability has created a loop hole to get out of the record without saving by being able to scroll.
If I read you correctly, a possible solution might be:
Create a new blank record
Search for a blank record
Then execute the current scripts. In a found set of 1, you cannot move back and forth unless you save and exit or delete and exit.
Does this sound like the right course to you?
That is one way to do it, but with your more detailed description, there's another alternative:
Use only global fields on your layout for entering/editing data. Your "save" button then performs a script to either create a new record and copy these values from the global fields into the non global fields of the new record or it updates an existing record--if that's a capability that you need here.
You also mentioned that this involved assigning a serial number. You are aware that serial numbers can be automatically entered into each new record without scripting?
Big problem is the module is in User Test Mode. This is how I found the problem, the user hasn't discovered it yet. Changing fields now would be a major issue if we start to find/create bugs. The module is pretty much finished and very solid.
I need a work around solution.
The serial number issue is that there are many Departments. Each department has a prefix. Example...Mechanic, Maintenance or Office, to keep it simiple.... MEC, MAI or OFF
The current code forces you to assign one of these first, before you proceed.... when you save, the Serial Number for that department advances by 1.
Eg. MEC1, MEC2, MEC3, OFF1, MAI1, OFF2, MEC4
Each independant of the other. SAVE button sets the field or, the record is deleted, the Serial NUMBER part is not advanced and you are returned to the list page with no changes.
I think, at this late stage, I need a different solution, than a rewrite of fields that may wreck havouc with other layouts and reports, setting the project back possibly a month. There are a large number of Global fields already, but something tells me to find a less elegant and more straight forward solution. There are course assignment links on this page as well... just thinking about it gives me a headach!
You aren't changing fields, you are adding additional ones and ones that need not be referenced by any other layout or part of your system beyond this data entry layout. The change may not even be visible to your users as you can enter layout mode and double cilck each field on this one layout and redirect them to the new globals.
Hope your serial number is not used as a primary key for linking related records. That's a far from optimum design choice.
I will take a look at this. Thanks.
No, don't worry, the serial number is not at all used to link anything. If memory serves, there is a _fkCourseID as the link.