Good morning all;
I wrote an administrative system for a large Hige School. The main db
is an Access database on an NT server. Now I have to update a local
mdb on the user stations. I can create a table on each but I am having
a problem creating an index on the new tables.
Here is the code I use to create the new tables.(Almost straight from
vb Help examples)
question;; How can I create an index to this table with two fields.
Regent,Student

Sub CreateRegDataTable()
Dim dbsSIS_V7 As Database
Dim tdfNew As TableDef
Dim fldLoop As Field
Dim fldTemp As Field
Dim indexTemp As Index
Dim prpLoop As Property
Dim i As Integer
Set dbsSIS_V7 = OpenDatabase("c:\program files\sis_v7\SIS_V7.mdb")

Set tdfNew = dbsSIS_V7.CreateTableDef("Regents Summary Report")

' Create and append new Field objects for the new
' TableDef object.
With tdfNew
' The CreateField method will set a default Size
' for a new Field object if one is not specified.
Set indexTemp = .CreateIndex("Regent")

Set fldTemp = .CreateField("Student", dbText)
fldTemp.AllowZeroLength = True
.Fields.Append fldTemp

Set fldTemp = .CreateField("OSIS", dbText)
fldTemp.AllowZeroLength = True
.Fields.Append fldTemp

Set fldTemp = .CreateField("Regent", dbText)
fldTemp.AllowZeroLength = True
.Fields.Append fldTemp

Set fldTemp = .CreateField("Status", dbText)
fldTemp.AllowZeroLength = True
.Fields.Append fldTemp

End With
dbsSIS_V7.TableDefs.Append tdfNew

Thanks in advance.

Jim











------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/k7folB/TM
--------------------------------------------------------------------~-> 


'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [EMAIL PROTECTED]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to