[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 418
  • Last Modified:

AutoNumber data type

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
BWATERS
Asked:
BWATERS
  • 2
1 Solution
 
AnswerTheManCommented:
hear my advice - never use that type. it's just trubles.
have your own method of generating next number (long)
0
 
BWATERSAuthor Commented:
yes, maybe so, thank you...but that doesn't answer my need...
0
 
amebaCommented:
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
 
amebaCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now