• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

6. Data > 6.2. Determine if You’re on a New Record in a Form

6.2. Determine if You’re on a New Record in a Form

Problem

Often, you need to do different things depending on whether the current row is the “new” row on a form. For example, you might want to display a certain message box only when adding records. How can you do this?

Solution

You can use a form’s NewRecord property to determine if you are on a new record by checking its value from an event procedure attached to the OnCurrent event property or some other event property of the form.

Follow these steps to implement this functionality in your own forms:

  1. Create a new form or modify the design of an existing form.

  2. Create an event procedure for the form’s Current event. In that event procedure, create an


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint