473,487 Members | 2,616 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Auto number problem

24 New Member
I have builed a database in access and using forms of Visual Basic6
The problem is this
I have a field Id which is of type long and autoincrement
Now when i create a form and run and type my frist entry in id field like 1
it give me the message field is not updateble.
Plese tell me what the problem is this and how i can over come this problem.
and how it will show ID field first auto number automatically.

[HTML]ARALI[/HTML]
Jan 12 '08 #1
5 1987
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Yes, Auto Increment Field cannot be Editted.
If you want to show the next number, follow these steps:

Create A Query Object with following query:
SELECT Max(SlNo)+1 AS NextNumber FROM MyTable;
Save with Some name.

Now Create a Form For this Query... say frmNextNumber

Drag and Drop This frmNextNumber on your Main Form..

Regards
Veena
Jan 12 '08 #2
Killer42
8,435 Recognized Expert Expert
...Now Create a Form For this Query... say frmNextNumber
Drag and Drop This frmNextNumber on your Main Form
Unless, of course, you happen to be using Visual Basic for the forms, rather than Access. In which case this may not apply.

But as QVeen72 points out, the whole point of an "autonumber" field is that the value is generated automatically by Access. You can display it, but you cannot edit it.
Jan 13 '08 #3
arali
24 New Member
Hi,

Yes, Auto Increment Field cannot be Editted.
If you want to show the next number, follow these steps:

Create A Query Object with following query:
SELECT Max(SlNo)+1 AS NextNumber FROM MyTable;
Save with Some name.

Now Create a Form For this Query... say frmNextNumber

Drag and Drop This frmNextNumber on your Main Form..

Regards
Veena
Hello Veena
Thanhs for your help but iwas unable to do what you said.
Please tell me how to drag and drop a form on another form
and tell what to do with my problem other than that.
Regards
[HTML]ARALI[/HTML]
Jan 14 '08 #4
QVeen72
1,445 Recognized Expert Top Contributor
Hello Veena
Thanhs for your help but iwas unable to do what you said.
Please tell me how to drag and drop a form on another form
and tell what to do with my problem other than that.
Regards
You are using VBA..? or VB6..?

Regards
Veena
Jan 14 '08 #5
arali
24 New Member
You are using VBA..? or VB6..?

Regards
Veena
I am using Vb 6
Regards
ARALI
Jan 14 '08 #6

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

Similar topics

1
1556
by: dave | last post by:
I have one auto number field in one table in sql server 2000. I'm inserting new record using insert statement and am not giving any value for that field as its auto number. On the very next...
8
1814
by: Steven Burn | last post by:
I'm curious, I've written a very simple PIS (personal info store) that allows one to store whatever they wish..... the problem is, when one deletes an entry, the auto-numbering isn't corrected to...
1
6443
by: Theodore A. Jencks | last post by:
Hi all, I posted a question about a side navigation bar earlier where I was encountering this problem. I thought I'd repost the question in a more general format because I'm not sure people...
2
12699
by: Tom | last post by:
I am trying to store information into a table that has an auto increment field. There is currently no data in the table. Using the code below I cannot insert data into the table. I get an error...
2
1392
by: Vikaspell | last post by:
I want to set a auto number but the first 3 digits should be picked from a value of another table like for example a customer no is 999 i want the Pet no of this customer to be 999/(Autonumber) ...
16
20435
by: John Baker | last post by:
Hi: I know this is a strange question, but I have inherited a system where files are copied and records re auto numbered (as an index field) )frequently, and I am wondering how high the number...
2
2965
by: Mike N. | last post by:
Hello- I have a database that uses an auto number field type that goes out of sync periodically. My customer gets a "cannot add record, number already in use" error message. I dump the records...
3
2458
by: Robin Tucker | last post by:
Hi there, I have this really frustrating problem with Visual Studio (Microsoft Visual Basic .NET 2003 69586-335-0000007-18843). I have got used to using the autocomplete and auto indent...
13
4728
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when...
12
28395
by: badvoc | last post by:
Hi, I have had some good fortune on this site so I am back and I must iterate I am a beginer. I am having some problems getting to grips with the right technique to manage variables and...
0
6967
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
7137
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
7181
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...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5442
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.