Consulting

Results 1 to 6 of 6

Thread: problem with index --CANT UPDATE

  1. #1

    problem with index --CANT UPDATE

    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

  2. #2
    VBAX Regular
    Joined
    Jan 2007
    Posts
    20
    Location
    Can you explain what you're trying to do? index doesn't mean what you think it means.

    hth,
    Giacomo

  3. #3

    hi omocaig

    i just try to make modify and update record according the id field

  4. #4
    VBAX Mentor asingh's Avatar
    Joined
    Jul 2005
    Posts
    307
    Location
    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

  5. #5
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    Quote Originally Posted by malkasoft10
    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

  6. #6

    THANKS

    thanks My Problem Solved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •