Hi everyboy !
I'm not sure if my question goes here or on the VB discussion group, so I'll try here !
I open a FoxPro database in VBA(Excel) with teh following syntax :
Dim MyFoxProBD As Database
Dim MyFoxTable As Recordset
Set MyFoxProBD = OpenDatabase("c:\FoxProBD.dbc",dbDriverComplete,True,"FoxPro DBC;UID=;PWD=;")
Set MyFoxTable = MyFoxProBD.TableDefs("FoxTable").OpenRecordset(dbOpenTable)
At this moment, everything is ok and I can retrieve informations from my FoxPro table...
The problem is when I try to set my index...
MyFoxTable.Index = "MyIndex"
MyFoxTable.Index = MyFoxProBD.TableDefs("FoxTable").Indexes("MyIndex")
MyFoxTable.Index = MyFoxProBD.TableDefs("FoxTable").Indexes("MyIndex").name
I get an error with any of these 3 lines. Of course, MyIndex is a valid Index Tag in my .CDX. When I print the .Indexes.("MyIndex").name , it returns the correct Index Tag...
Any ideas ???
Thanks in advance
Benoit Grenier