Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005

    Unanswered: Only add 1 record on form

    I'm pretty unsure on how to explain my challenge, so bear with me.

    I have 2 forms - for readability called A and B - where A is a basic info, and B is detailed info. From A you can call up B by pressing a button executing the following code

        DoCmd.OpenForm "Stilling_guideopret", acNormal
        Forms!Stilling_guideopret.Stilling_arbejdsgiverid.Value = Forms!Stilling_guideformular.arbejdsgiver.Value
        Forms!Stilling_guideopret.Stilling_arbejdsgiverkontaktid.Value = Forms!Stilling_guideformular.kontaktperson.Value
    On the target form (B) the Dataentry property is enabled, and allow additions also.

    The user tabs along the fields and enters data, but when tabbing out of the last field, the form moves to a new record.

    I would like the user only to be able to enter 1 record, and click a button "save details and close" and never (ever) move to a new (and empty) record, causing total panic.

    Any help is highly appreciated.

    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

  2. #2
    Join Date
    Nov 2011
    If DCount("YourPrimaryKey", "YourTableName" > 1 Then
    DoCmd.AllowAdditions = False
    End If


Posting Permissions

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