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

Posted on 2011-05-01
Medium Priority
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
  • 3
  • 2
LVL 26

Expert Comment

ID: 35502664
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

ID: 35504121
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

Nick67 earned 2000 total points
ID: 35505729
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

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

Author Comment

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

840 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