473,386 Members | 1,754 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.

Access data entry problem

24
I am using Access
I made a Database in which i define a field in table id as Auto increment field.
I im using switchboard manager to open the form in dataentry mode.
When i open form and just type some thing in other field not save it and close the form with out saving .
When i open again the form the Auto increment field is incremented.and there is no other data in other fields they are blanck.
Even when i Navigate through other fields and close it when i again open it the field is incremented .how to over come this problem.
Regards
<< ARALI >.
Jan 24 '08 #1
6 1892
mshmyob
904 Expert 512MB
Is your auto increment field bound to your table and your other fields unbound?


I am using Access
I made a Database in which i define a field in table id as Auto increment field.
I im using switchboard manager to open the form in dataentry mode.
When i open form and just type some thing in other field not save it and close the form with out saving .
When i open again the form the Auto increment field is incremented.and there is no other data in other fields they are blanck.
Even when i Navigate through other fields and close it when i again open it the field is incremented .how to over come this problem.
Regards
<< ARALI >.
Jan 24 '08 #2
missinglinq
3,532 Expert 2GB
When i open again the form the Auto increment field is incremented.and there is no other data in other fields they are blanck.
When you open a form in DataEntry mode the fields will always be blank! DataEntry mode only allows new records to be entered/viewed. The autoincremented field has a value because you've set this up to happen when a new record is created.
When i open form and just type some thing in other field not save it and close the form with out saving .
In Access, when you enter data in a record and then move to another record or close the form, the default behavior is to save the record, which is what is happening here. If you open your underlying table, you should see a record for each autoincrementing number you've created.

To prevent this from happening, you need to place code in the Form_BeforeUpdate event, asking the user if they want to save the record. If they respond Yes, you do nothing and the record is saved. If they respond No, you use Cancel = True which dumps the entered data.

Linq ;0)>
Jan 24 '08 #3
mshmyob
904 Expert 512MB
That is true Linq but according to his description he is opening the form for data entry and has a Autonumber field. As you say it will automatically generate a record and put a value in that field but then he also says that he enters data into other fields on his form and closes it 'without' saving and when he reopens it he has the new record with the autonumber filled in but no other data.

It sounds to me like his text boxes on his form are not bound to the table and that is why no data appears in the record other than the auto number field.

You think that might be what is happening? I am still waiting for his reply.

When you open a form in DataEntry mode the fields will always be blank! DataEntry mode only allows new records to be entered/viewed. The autoincremented field has a value because you've set this up to happen when a new record is created.

In Access, when you enter data in a record and then move to another record or close the form, the default behavior is to save the record, which is what is happening here. If you open your underlying table, you should see a record for each autoincrementing number you've created.

To prevent this from happening, you need to place code in the Form_BeforeUpdate event, asking the user if they want to save the record. If they respond Yes, you do nothing and the record is saved. If they respond No, you use Cancel = True which dumps the entered data.

Linq ;0)>
Jan 24 '08 #4
missinglinq
3,532 Expert 2GB
No, there is nothing in this post to suggest that his fields are unbound! If his post is accurate, that is not what is happening! He didn't say he was opening the form for data entry, he said

"I im using switchboard manager to open the form in dataentry mode."

As I explained before, when a form is opened in dataentry mode it opens to a new record. In dataentry mode you can only add new records, you cannot view existing records! The data he is entering is, I am sure, being saved to the underlying table; this is evidenced by the fact that the auto-incremented number keeps increasing.

He also made no mention of an Autonumber, he said auto incremented number. These are two entirely different things. An Autonumber is created by Access, and really should never be seen/used by the end user ; it should only be used by Access for internal housekeeping. An auto incremented number, on the other hand, is generated thru custom VBA code, and can be used for such things as generating ID numbers, account numbers, etc.

Linq ;0)>
Jan 24 '08 #5
mshmyob
904 Expert 512MB
Yes of course. Now I understand. He is constantly opening a new record, he is not reviewing his previous records.

Thanks for clearing that up for me.

No, there is nothing in this post to suggest that his fields are unbound! If his post is accurate, that is not what is happening! He didn't say he was opening the form for data entry, he said

"I im using switchboard manager to open the form in dataentry mode."

As I explained before, when a form is opened in dataentry mode it opens to a new record. In dataentry mode you can only add new records, you cannot view existing records! The data he is entering is, I am sure, being saved to the underlying table; this is evidenced by the fact that the auto-incremented number keeps increasing.

He also made no mention of an Autonumber, he said auto incremented number. These are two entirely different things. An Autonumber is created by Access, and really should never be seen/used by the end user ; it should only be used by Access for internal housekeeping. An auto incremented number, on the other hand, is generated thru custom VBA code, and can be used for such things as generating ID numbers, account numbers, etc.

Linq ;0)>
Jan 24 '08 #6
missinglinq
3,532 Expert 2GB
It would appear that this is what's happening, from the information given in the original post. It would be unlikely (although, of course, not totally impossible) that the auto-incrementing field was bound but the other controls were unbound. Unbound controls generally have one of two purposes. They're either used to hold calculations, in which case you don't manually enter data in them, as the OP stated he does here, or they're used to enter criteria for something such as a search or for a query, in which case you don't expect to see the data in the control the next time you visit the record.


Linq ;0)>
Jan 24 '08 #7

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

Similar topics

49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
8
by: Thats Me | last post by:
Background: Access 2000 running on Windows 2000, Did not design inherited (three previous database maintainers in last 18 months), Non-existent comments for existing code modules and objects, six...
1
by: Eduard | last post by:
Hello, I am very interested in the access 2000 data base posibilities. I hope learn a lot about acces 2000 and solve some of your questions. I have a big and simple problem. I use access to entry...
4
by: Robert | last post by:
I would like to know why Access tables are updated immediately upon being changed (in table view or forms view). It seems to me that, at least with a single record form, that Access could have been...
5
by: Prakash | last post by:
Hi, In my Access Report ... If there is "NO" entry i.e. (no corresponding CODE) in my Data-File, then even the Master-File entry does not show up in the report. eg. Mast-File Code Op.Bal
24
by: cassetti | last post by:
Here's the issue: I have roughly 20 MS excel spreadsheets, each row contains a record. These records were hand entered by people in call centers. The problem is, there can and are duplicate...
13
by: mfreeman | last post by:
The minimal code (VB.NET 2003) needed to show this problem is shown below. All I do is loop through the records in the table and update them without making any changes. Out of 600 records, about...
0
by: sram | last post by:
Hi, Problem statement: We have some amount of data stored in various excel sheets and we generate a few reports from these data. We are in the process of consolidating all data to reside in a...
5
by: SRAM | last post by:
Hi, Problem statement: We have some amount of data stored in various excel sheets and we generate a few reports from these data. We are in the process of consolidating all data to reside in a...
20
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.