Mimicking the MS Office “New” function

I am having a problem with a form application that I am developing. When it loads, I want it to display a new, blank record, just like when a user clicks File > New in Microsoft Word or Excel. When the user saves the record, I want the application to go into edit mode for that record. It seems like it should be very simple to set up an application so it opens with a blank record and goes into edit mode when the record is saved, but I haven?t been able to figure out how to do that. Any help will be greatly appreciated!

Currently, when the user opens the application, it displays the first record in the associated table, not a blank record. If the user then clicks the ?Add New? (Insert) button, the application works as I want – a new blank record is displayed in the form, and when the user enters data into the form and clicks the ?Add? (Insert) button, the application goes into edit mode. (I have set ?Return after Inserting? to ?Yes? on the Application > Navigation panel.) However, I don’t want the application to display the first record in the table when it is opened.

I have tried displaying various combinations of buttons on the toolbar but none of them produce the combination of opening with a new blank record and then going into edit mode when the record is saved. I have also tried to use sc_btn_display( ) on the Events > onLoad panel to hide buttons and the Events > onAfterUpdate panel to display buttons, but that has not worked as I had hoped. The application either displays a new blank record when opened and then displays another new blank record when the “Add” (Insert) button is clicked, or it displays the first record in the table when opened.

How can I set up the application so that it display a new, blank record when opened and goes into edit mode after the user enters data into the form and clicks the ?Add? button?

You can use : sc_apl_conf(“yourform”, “start”, “new”);

on Event: onApplicationInit