Solved

AutoNumber data type

Posted on 1998-12-13
4
411 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

809 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