Indexed(Yes Duplicates OK) VB+DAO+Access

Posted on 2003-03-01
Medium Priority
Last Modified: 2008-02-01
FieldName        FieldValues     FieldSize

EmpName          text          16
EmpNUmber     text          8
Address          memo
Date          date
IndexNum     AutoNumber

I want set the Indexed(Yes Duplicates Ok) to the Field like(EmpName).How can i do this progrmming through VB with DAO.

If any one knows please help me.

Thsi is my code

Private Sub AppendTable()

set db = DBEngine.OpenDataBase("test.mdb")
Set tbf = db.TableDefs("employee")
'MsgBox tbf.Name
With tbf
   .Fields.Append .CreateField(empname, strText)
   '.Fields.Append .CreateField("strField", dbLong)
End With

Set tbf = Nothing
Set db = Nothing
MsgBox "Successfully Added the Table"

End Sub

Uma T
Question by:umaakce
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

Accepted Solution

fluglash earned 150 total points
ID: 8047362
place on the form data contorol...and then i advice you to use DDL statements Create Table and Create Index (look for syntax in MSDN)

i think it`s more functional

Expert Comment

ID: 9447427
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans

762 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