PDA

View Full Version : problem with index --CANT UPDATE



malkasoft10
05-01-2007, 04:22 AM
hi freinds
I?m using Microsoft Access XP 2000 Database and Microsoft DAO
3.6 Object Library to access the data
the problem is that whenever I try to set the
Recordset.Index property to the table?s Id field I get a run-time
error 3800 thats says : id is not an index of this table

dim rs as DAO .RECORDSET
DIM DB AS DAO.DATABASE

Set db = CurrentDb
Set rs = db.OpenRecordset("accountatat", DB_OPEN_TABLE)

rs.Index = "id " ERORR APPEAR HERE
rs.Seek "=", (acco_no1)
If Not rs.NoMatch Then
rs.edit
acco_no1 = rs!id
account = rs!account_name
'dm.Close
rs.Update
Call clear
End If

AND THE TABLE SEEM

ID --TEXT (INDEX)
ACCOUNT_NAME ---TEXT

WAITING YOUR REPLY
THANKS:banghead:

omocaig
05-01-2007, 04:03 PM
Can you explain what you're trying to do? index doesn't mean what you think it means.

hth,
Giacomo

malkasoft10
05-01-2007, 10:35 PM
i just try to make modify and update record according the id field

asingh
05-03-2007, 04:17 AM
index ideally creates an ORDER of your recordset.

What error are you getting..else if possible post a stripped down version of the Access DB..and we can look at it..

click here to know more about recordset and index:

http://msdn2.microsoft.com/en-us/library/bb208479.aspx


regards,
asingh

stanl
05-03-2007, 07:27 AM
hi freinds
error 3800 thats says : id is not an index of this table


Like the others said, you are confusing the index property with an actual index named "ID". The index property acts the same as a bookmark.

.02 Stan

malkasoft10
05-08-2007, 04:05 AM
thanks My Problem Solved