Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003

    Unanswered: detect if a record has been created

    I have a form which can either be opened to view data, or opened for data entry.

    When the form has been opened in data entry mode, I need a way of telling if the record has been edited.

    There is an autonumber field on the form, so I thought that if the record has not been changed, the the autonumber field will be null... Instead I receive an error telling me that an object is required...

    How can I get Access to confirm if the current record exists or not?



  2. #2
    Join Date
    Jan 2003

    I can't tell what sequence of events is occuring, so I don't know how helpful my answers will be.

    To verify if there have been changes in the record, use the Form's Dirty event.

    The AUTO in auto number means that a number will be assigned to the record as soon as the record is created. Otherwise changes in the record (short of deletion) have no impact on the autonumber.

    Programmatically you can test if the form's recordset has any records through the HasData property. Otherwise see if the autonumber field is null or not to determine if there is a current record.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts