Results 1 to 6 of 6

Thread: New Record

  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    New Record

    I have a database for recording procedures. I have a main form for the details of the procedure, and a sub form for when the procedure is updated, and the previous issue superseded. When I start typing in any of the records on the sub form, Access creates a 'new' blank record. How can I surpress this until a check box is ticked.

  2. #2
    Star Lounger
    Join Date
    Dec 2009
    Location
    Midwest, USA
    Posts
    76
    Thanks
    3
    Thanked 2 Times in 2 Posts
    You could hide the field boxes on the form. Show blank text boxes for the field information. When all the text boxes are filled, checking a box could run a macro updating all of the actual field boxes with the information from the text boxes and creating your new record.

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,537
    Thanks
    0
    Thanked 23 Times in 23 Posts
    Have you tried putting a test in the subform's BeforeUpdate event to cancel the write to the database.

  4. #4
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks caveman & patt. This is harder than I thought, just to hide empty records. I don't want even the empty rows to show, until the check box is ticked. I've tried setting allow additions on the form to no, and then putting a procedure in the after update to allow additions, but still that doesn't work.

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,537
    Thanks
    0
    Thanked 23 Times in 23 Posts
    You can the use the ESC key to fully erase the new record from the subform.
    If that doesn't work then send a zipped copy of the database.
    Last edited by patt; 2014-07-23 at 20:50.

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,326
    Thanks
    1
    Thanked 12 Times in 12 Posts
    I'm not sure I fully understand your problem, but couldn't you set the AllowAdditions property of the subform to Off, then set it to ON when you're ready.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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