Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2002
    Location
    USA
    Posts
    66

    Unanswered: subform question

    Greetings,
    I have main form along with a subform. In the subform I use the record selector to go to the next record for instance, to add new record. However, even if I do not add a new record and close it, it will assign ID and save it as a new record. Could you please tell me why?

    Thanks in advance!

    OCM

  2. #2
    Join Date
    Oct 2003
    Location
    US
    Posts
    343

    Re: subform question

    Beucase you must have your id as Autonumber data type set in the table. With autonumber, as soon as you move to the new record, it creates a new id and places it in the new record. Now when you move out, Access saves the record, thats why you a blank record with only id in it. To fix it, either hit <ESC> key to undo the changes or use vba code to undo the changes.

    Remeber ... anytime you move out of a record without undoing, your changes will be saved.

    Originally posted by OCM
    Greetings,
    I have main form along with a subform. In the subform I use the record selector to go to the next record for instance, to add new record. However, even if I do not add a new record and close it, it will assign ID and save it as a new record. Could you please tell me why?

    Thanks in advance!

    OCM

  3. #3
    Join Date
    Sep 2002
    Location
    USA
    Posts
    66
    But I did the same thing in my main form: clicked add new record and didn't put anything, close form and opened it again. It didn't save the blank record. Just to clarify, In my table I set the ID for the main table as Autonumber data type and for the subform as number datatype.

    Thanks,

    OCM

Posting Permissions

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