after i hit add record- and close form- a extra record is created with one field all the time

Posted on 2011-05-01
Last Modified: 2012-05-11
if you enter a number and choose a checkbox and enter about 3 or 4 serial numbers-
after you close the form- you will see the table produces 1 extra record with the RUN field filled- Is there a way to stop this?
i have added an delete query- but when form closes- it still produces that one extra record- with one field filled
Can you help?
than you
Question by:davetough
    LVL 26

    Expert Comment

    Do you mean the line with the * at the beginning?
    That is not an added record.
    The * signifies that it is the new record.
    ShipDate is filled in because it has a default value in the table design

    Author Comment

    thanks - but unless its cured itself- if you add a records and with about 3 or more serial numbers-
    and close form you come up with
    (uploaded too big of snapshot - think)
    1 number in run field of record and also after that the record w/ *
    LVL 26

    Accepted Solution

    OK, I think I've got it.

    You are playing mix and match.
    Are all bound.

    So when you enter stuff into them, you are by default starting a record--which gets saved when you close the form
    Command14 ***creates*** one row for each listing in the boxes--so you are getting one more row than you plan upon.

    Unbind everything, and have your SQL be the only thing that creates records
    I am a recordset guy and I HATE mega-quotes, so in the altered sample I've got recordset code doing the appending
    You could get your SQL to do it too, but I'm not going to drive myself nuts trying to debug that.
    For adding one record at a time, recordset code is much cleaner, anyway.

    Let me know how it goes


    Author Closing Comment

    thanks for explanation and help- I am going to study this awhile- I will post back

    Author Comment

    your solution works great - I am going to use that-thanks again

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now