i have another problem..
i tryed to make my program locate the database name for data1 from an ini file. i made the ini file tell where the data.mdb file is and yet i get an error massage. this is the massage: "object variable or with block variable not set". do you know why i get the error or what it means? .. thanks..

someone told me i need to declare a variable im using.. but i didnt thats not enough information for me..

this is the code i use (this code reads database faster )

SIniFile = App.Path & "\CharGen.ini"
Dim sBuff As String * 255
n% = GetPrivateProfileString("Database", "Path", "DefaultPath", sBuff, Len(sBuff), SIniFile)
Data1.DatabaseName = sBuff
Data1.Recordset.MoveLast
intRecCount = Data1.Recordset.RecordCount
Data1.Recordset.MoveFirst

For intCounter = 1 To intRecCount
List2.AddItem Data1.Recordset!Description
Data1.Recordset.MoveNext
Next intCounter


thanks