473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MS Access when i close the form empty record is insertig into table

Hi,
i created form in ms access using form wizard.
and entered data in the fields and click on save button the record is inserted into table.its Logic is working fine and when i click on close Form button in form it is inserting empty record in table.

can anyone please provide the solution how to prevent empty
record when i click on close form button.
Sep 19 '14 #1
3 1490
twinnyfo
3,653 Expert Mod 2GB
veeru8989,

Could you please post the code behind your form? This will help us look for solutions.
Sep 19 '14 #2
zmbd
5,501 Expert Mod 4TB
also version of office/access
Sep 20 '14 #3
NeoPa
32,556 Expert Mod 16PB
Check the record selectors. If your new record has been dirtied (Some change has been made to the data in there.) then anything you do that takes the focus away from that record will save it. As the Close button is off the record this will necessarily happen before it executes the code behind the button.

As I say, check the record selector. It will show a pencil icon as soon as the current record is dirty. It's a very important thing to look out for when using Access.
Sep 21 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: swingingming | last post by:
Hi, in the NorthWind sample database, when clicking on the next navigation button on the new order record with nothing on the subform (order details), we got an order with nothing ordered. How can...
30
by: S. van Beek | last post by:
Dear reader A record set can be empty because the condition in the query delivers no records. Is there a VBA code to check the status of a record set, record set empty
4
by: Mindy | last post by:
I have two questions here: (1) what is the difference of close form and close table? (2) How "Prompt" works I used close form macro in my database. I hope when a user close the form, he/she will...
8
by: TORQUE | last post by:
Hi, I am having some trouble with recording a field on a form into my Table after formatting it to calculate several fields on the form. If i just put the amount in the field and have it linked...
2
by: Tom_F | last post by:
To comp.databases.ms-access -- I would like to trigger an event when I close a form -- but ONLY when the data in the "RecordSource" table has been updated. I tried using the AfterUpdate event,...
8
by: lmurgas | last post by:
FormA = List of organization records bound to table FormB = Tabbed form with details of organization and all other related entities, such as orders, contacts, invoices, (all as subforms bound to...
2
by: Hulas | last post by:
Guys, I have two questions. (a) How do I add two fields of the same table to a single combo box. For example if I have two fields ID1 and ID2 in a table called Identification, than how should I...
2
by: Gerald Taylor | last post by:
Please excuse any idiotic questions as Access/VBA is a new area to me. I have inherited an Access Database/Application that is used to sign in and out visitors and Staff to our community Centre....
6
by: time2hike | last post by:
Hi, I have an Access Database that is linked to Oracle 11G tables. I have a vba Sub that is trying to delete selected data from the Oracle table. I am getting an error that Microsoft Access...
3
by: nikolazl | last post by:
Hi people.I have a problem and I will try to describe it.I have 5 forms in my Visual Basic application.First one is startup and other 4 forms are connected with first one.Also I have TextBoxes on all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.