Home

Macros and Programming

 

CardboxForumsMacros and Programming > "in edit mode jump back to field after saving"

in edit mode jump back to field after saving

Has anyone an idea how to make a macro that remembers the field that you just left after saving

Current user: [none]
Register / Log In · Help

Posted By Post

herman.cbx

21-Nov-2017 13:41

After editing and saving a record you leave the record. Now I want a macro that jumps back (after Edit again) to the field that I edited before saving, so I can continue in that field.
Is that possible?

regards,
Herman

bert

21-Nov-2017 21:04

Make a macro that saves the record. When you want to save a record, use that macro for saving it.
In that macro you can write the FieldName where the cursor is on the moment when the record was saved to a ScrapField.
Editing again: make also a macro for it and let the cursor jump to the field that was (just) written in the ScrapField.
One step further: you can replace the standard SaveRecord command/button for a button that starts the saverecord macro.
For editing is such a system not fool proof: The Edit command/button you can change. However double click in a record/field with the mouse you cannot change it to a macro.
Regards
Bert

herman.cbx

22-Nov-2017 10:29

Thank you Bert, with your help the macro was easy to write:

fld=ActiveFieldName
SaveRecord
EditRecord
GoToField fld

Charles Welling

23-Dec-2017 12:10

May I remind all of you that in Cardbox it is possible to link the Save command to a macro. Of course you can link CTRL-S to a macro, but if you link the Save icon to a macro the menu option (Record > Save record) will activate the macro as well. This is an undocumented feature.
Doing so will always and automatically activate the macro when you save a record, no matter how you save it.

Using such an "on save" macro will also enable you to enhance your validation, as macros can do much more elaborate checking than the standard validation.

Quick Reply

Please log in or register before trying to post a reply.

 
© 2010 Cardbox Software Limited   Home