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

Automatic botton Access

48
Hello, I have a question I have a form call Add record. The user needs to fill out several fields and then after pressing the Add button it will add the record to a table. I would like to create a textbox within the form so that when the user adds the record it would keep a number for that record. So basically the button needs to generate an automatic number for each new record. Do someone has an expample code for this case. I needly badly. THanks in advance!!!
Nov 30 '07 #1
4 1445
Nathan H
104 100+
Do you have an Autonumber field in the underlying table? This should automatically populate when you add a new record.
Nov 30 '07 #2
margot
48
Do you have an Autonumber field in the underlying table? This should automatically populate when you add a new record.
Yes, but I want to bring that number to the actual form. How may I do that?
Dec 3 '07 #3
Nathan H
104 100+
Yes, but I want to bring that number to the actual form. How may I do that?
In Design View on the form, you should be able to add a text box where the field source is the autonumber field in the table.
Dec 3 '07 #4
missinglinq
3,532 Expert 2GB
Here's a recent post from John W. Vinson, MVP, on this subject that you ought to read:

“When using Autonumber, do be aware that there will be gaps in the numbering - any record that's deleted will leave a gap; hitting <Esc> after starting a record will leave a gap; adding records using an Append query may leave a gap, often a huge one; replicating the database will make your invoice numbers random.

In short... it's best NOT to use Autonumbers for human consumption, and particularly not for consumption by accountants and auditors. Invoice sequences like 319, 321, 322, 385, 386, 221841246, -1083225152 make such people get very nervous.”

If you need consistently consecutive numbers, you need to generate your own incrementing numbers.

Linq ;0)>
Dec 3 '07 #5

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

Similar topics

0
by: Rasmus Fogh | last post by:
Someone raised the question of automatic code generation a few weeks back. And yes, we (CCPN) are using automatic Python code generation in a major way. Basically we are making data models in...
9
by: msnews.microsoft.com | last post by:
Hello! I'm Jim by asp How can show "abc" in textbox when click one botton?
5
by: fatih kayaalp | last post by:
Hi, i have imported an access database into sqlserver 2000. In access, i have some table fields which were using automatic number as datatype. But i see that there is not a datatype in sqlserver...
7
by: xtheriaultx | last post by:
i need a textarea that opens a local txt file with the click of a botton. I dotn want a browse one, I just want one that opens a set file, like c:/dot/lol.txt . Ty for the help, ill check on the...
4
by: Eduardo78 | last post by:
I have been trying to change the default accept botton from a VB app. messagebox to No or Cansel instead of yes or ok, which are the default accept bottons. thanks for any suggestions.
1
by: Eduardo78 | last post by:
I am working on a web application, my first one, I used to program windows app. and the form had an property where i could set a key to be de default to execute a botton click event. But now I...
1
by: Michel Esber | last post by:
Hello, Linux RedHat AS4 running DB2 V8 FP11. I have followed the docs at http://tinyurl.com/qckrn and enabled automatic statistics collection. It has been 2 days since I updated my DB cfg and...
2
by: ray | last post by:
I have a client that doesn't want Access to automatically repair into a backup file if it crashes (and it crashes only on very rare occasions). My (sketchy) understanding is that this is a...
58
by: Jorge Peixoto de Morais Neto | last post by:
I was reading the code of FFmpeg and it seems that they use malloc just too much. The problems and dangers of malloc are widely known. Malloc also has some overhead (although I don't know what is...
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: 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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...

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.