?
Solved

Indexed(Yes Duplicates OK) VB+DAO+Access

Posted on 2003-03-01
3
Medium Priority
?
354 Views
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)
   .Fields.Refresh
End With

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


End Sub

thanks
Uma T
0
Comment
Question by:umaakce
[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
3 Comments
 
LVL 7

Accepted Solution

by:
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
0
 

Expert Comment

by:CleanupPing
ID: 9447427
umaakce:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

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