Empty Record being created

I have a form where the user will update the recordset, and after closing the form, there is a blank record (other than key) created.

I have looked at the events on the form nothing other than form refreshes being performed.  I can not find any reason why an additional record is created when the user updates an existing record via the form
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can add "Required" property to any field in your table. After this you will get an error when empty record will be added. Select "debug" and you will see code, where record is added. You can use "On error resume next". In this case record will be not added to table with required field

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
John TsioumprisSoftware & Systems EngineerCommented:
Probably you have something "extra" in your code that is "pushing' the empty data....breakpoint/debug your data along with constantly querying the underlying table to see when the empty record is inserted....
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Do you have any code in the OnCurrent even?
And if so ... are you setting any 'default values' or otherwise ?

" nothing other than form refreshes being performed"
Can you elaborate ?
Refresh has the side effect of forcing the current record to be saved if it is dirty.  Always use an explicit save command if that is your intention.  The standard is DoCmd.RunCommand acCmdSaveRecord.  An alternate that circumvents a particular problem which I have never encountered is.  Me.Dirty = False.

Given the symptoms, your code is dirtying the record and the Refresh is forcing it to be saved.  I use the method suggested by als.  Setting declarative RI on the table means that regardless of what prompts the update, the database engine will enforce your rules.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.