Solved

AutoNumber data type

Posted on 1998-12-13
4
410 Views
Last Modified: 2012-06-21
When creating a field with VB, if the type is TEXT, the data type is dbText, MEMO is dbMemo, etc.
What is the data type constant for creating an AutoNumber field type?
Or how would I create it in VB without going into MS Access.
0
Comment
Question by:BWATERS
  • 2
4 Comments
 
LVL 5

Expert Comment

by:AnswerTheMan
ID: 1449800
hear my advice - never use that type. it's just trubles.
have your own method of generating next number (long)
0
 

Author Comment

by:BWATERS
ID: 1449801
yes, maybe so, thank you...but that doesn't answer my need...
0
 
LVL 15

Accepted Solution

by:
ameba earned 100 total points
ID: 1449802
fld is AutoNumber if:
1. (fld.Type = dbLong)
2. ((fld.Attributes And dbAutoIncrField) = dbAutoIncrField)

And it is OK if you use it without user knowing it exists. Of course, if you use it for some type of numbering, visible to user, you are in trouble. Don't expect you will be able to fill gaps (holes) in generated numbers.

0
 
LVL 15

Expert Comment

by:ameba
ID: 1449803
BWATERS, you can use 'Visual Data Manager' (Add-Ins menu) instead of Access. Well, you can't define relations in it, but its source is available - Visdata.Vbp in samples directory.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now