Data Cotrol (DAO) and Index 
Author Message
 Data Cotrol (DAO) and Index

I have a small program that has the Data control linked with four text
and a command button labeled "Find". This a price list data base therefore I
just want the user
to type in his selected Catalogue number and have it appear in the text
Everthing seems to work fine except for an error saying that my table is not
index and refer to tabledef object?
this is my code...

Private Sub Command1_Click()
Dim prompt As String
Dim searchstr As String

prompt = "Please enter the catalogue number."
searchstr = InputBox(prompt, "Cat Number Search")
Data1.Recordset.Index = "PriceList"
Data1.Recordset.Seek "=", searchstr
If Data1.Recordset.NoMatch Then
MsgBox ("Sorry that catalogue number is not correct,please try again.")
End If

End Sub
The error occurs in the .."Data1.Recordset.Index= "PriceList"...
This is the name of my table.

Hoping that someone can help a newbie.

Many Thanks....Rob

Wed, 15 May 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Data Cotrol (DAO) and Index

2. DAO - Fill in foreign key with correct PK index from a string-data table

3. Data Cotrol Question?

4. HELP! Using queries w/ Data cotrol

5. vb5 data cotrol sorting?

6. ADOC Data cotrol

7. How to insert data from un-indexed tabel to indexed table

8. Too many indexes - Wierd hidden indexes preventing index add

9. Creating Indexes with DAO

10. Add field to index thru DAO

11. Add field to index thru DAO

12. DAO and Adding Index to a Table


Powered by phpBB® Forum Software