View Full Version : New Records


clauses
11-16-2001, 11:01 AM
Is there anyway to tell when you are accessing a new record using the navagation key on a form. I have a field representing a counter on my form and I would like to automatically increment the counter for that group of records when the user goes to a new record.

For example A class is assigned a number of assignments that are numbered sequentially. When given a new assignment the last assignment numnber for that class is incremented by 1 and displayed in the assignment number text box on the new form.

Jack Cowley
11-16-2001, 11:44 AM
In the On Current event of the form you can use the 'If Me.NewRecord Then...' syntax to determine if the record selected is a new record. If it is a new record then add your code to increment your count by 1 and add it to the appropriate field on the form.