Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2010
    Posts
    15

    Unanswered: use docmdopenform,,,acFormAdd and only add one record?

    Hi
    is it possible to open a form in dataentry mode and only allow the user to insert 1 record?
    What happens a lot is that a user makes some sort of mistake and a new records is created with lots of empty fields.

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by dirkjan75 View Post
    Hi
    is it possible to open a form in dataentry mode and only allow the user to insert 1 record?
    What happens a lot is that a user makes some sort of mistake and a new records is created with lots of empty fields.
    How is limiting the records added to one going to rectify creating a record with "lots of empty fields?"

    What you need is to do validation in the Form_BeforeUpdate event to insure that all required fields are populated before saving the record.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Apr 2010
    Posts
    15
    Ho, thanx for the reply.

    I don't want to program all kinds of msg warnings is records aren't filled before going to a new blank record, rather I would like for a user to only insert one at a time (then save, then back in edit mode).

  4. #4
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by dirkjan75 View Post
    Ho, thanx for the reply.

    I don't want to program all kinds of msg warnings is records aren't filled before going to a new blank record, rather I would like for a user to only insert one at a time (then save, then back in edit mode).
    You do not have to have a lot of msgbox warning for every field, just one informing the user to complete the required fields

    In cases like this, I like to use a data entry wizard style form. You could only ask for the required fields before saving the record.

    See:

    Wizard Form template
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

Posting Permissions

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