473,378 Members | 1,539 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,378 software developers and data experts.

Add New Record adds a new records, though not clicked

Dear sir,

I have designed one data entry form and placed one command button that adds (save) entries from fields on the form to table records when clicked. However, I have noticed if I just bypass the command button by pressing tab (not a click), it adds the values of the fields to the respective table. I tried to set AllowAdditions=FALSE after form is loaded and new record is added but it just makes all my control invisible. What should I do ? I want if someone keeps pressing tab after feeding the values in the text boxes and combo boxes it should not add them to table until the command buttong is pressed.

Thanks & Regard,
Jun 4 '10 #1
1 1407
missinglinq
3,532 Expert 2GB
My guess is that your AddNew command button is not "adding a record without being clicked!"

Access, by default, saves a record when you move to another record, whether it be a new record or an existing record. It also saves the current record if you close the form.

What is happening when you hit the <Tab> key is that you're are being moved to a new record. This is the default behavior. To change this, in Form Design View, goto Properties - Other and change the Cycle Property from All Records to Current Record. Now when you get to the last control on your form and hit <Tab> the cursor will cycle back to the top of the current form, not go to a new record.

If you want to prevent Access from automatically saving a record when moving to a different record or closing the form, you'll have to put code in the Form_BeforeUpdate event asking the user to save or dump the record.

Welcome to Bytes!

Linq ;0)>
Jun 4 '10 #2

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

Similar topics

9
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST ==...
2
by: Tony Williams | last post by:
I have two tables one lists the names of committees and the other is a list of documents they generate. I have a form based on the documents table which gives details of the document including...
3
by: CSDunn | last post by:
Hello, I have an Access 2000 Project in which the data comes from a SQL Server 2000 database, and multiple users need to be able to see new records as each user adds records. The users also need...
0
by: Anita Mossey | last post by:
I have a table named tblSkills consisting of two fields named ContactID and Skills. The table does not have a key. The NotInList code below is for a subform that consists of a text field with a...
3
by: William Wisnieski | last post by:
Hello Everyone, Access 2000, I have a main unbound form with a bound datasheet subform . The subform is bound to a query that returns records based on criteria in the main form. The user...
13
by: Jan | last post by:
Hi I have a database that I use to keep track of the sales promotions that we send to companies. I normally send a mailing based on a subset of the companies in the database (found using the...
7
by: Shaldaman | last post by:
Hi Is there a property in MS Access for the following: 1) For a Command Button on a form, is there a property that can be used to determine if it has been clicked? eg: Me!button7.Clicked - I...
22
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
15
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, I have a database and i have deleted a record. Suppose I have records 1,2,3,4,5,6,7 And i delete no 5 now my record will appear 1,2,3,4,6,7 But i want to rearrange them by 1,2,3,4,5,6...
3
by: Gord | last post by:
If I have a form open with a subform control on it in datasheet view that has its record source set to a query or a table, is it possible to determine which record the user has clicked into with...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.