Solved

AutoNumber data type

Posted on 1998-12-13
4
413 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

732 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