Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Aug 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Not a valid bookmark!!! Error msg (Access 2002)

    Hi everybody. Yet again i call on your experience to help me out of a bit of bother. We have written a stock allocation system, but sometimes we get the not a valid bookmark error. Can anybody tell me why this happens and how i can stop it so that it doesnt keep messing up my stock take!!
    thanks v much. <img src=/S/bash.gif border=0 alt=bash width=35 height=39>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Not a valid bookmark!!! Error msg (Access 2002)

    Since you don't provide any information about the circumstances in which the error occurs, I can only give a general answer.

    This error usually indicates that one or more records in a table have become corrupt. Try compacting the database (Tools | Database Utilities | compact and Repair Database...).

  3. #3
    New Lounger
    Join Date
    Aug 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Not a valid bookmark!!! Error msg (Access 2002)

    thanks hans. here is the code. wonder if this helps

    Sub AutoAllocate_Click()
    DoCmd.RunCommand acCmdSaveRecord
    If PassVars(3) = "0" Then
    MyMsgBox ("Cannot do auto allocation with no specific size")
    Exit Sub
    End If

    If Forms![consignment sales allocations]![AllowAutoAllocate] = False Then
    MyMsgBox ("Cannot auto allocate this product, not allowed")
    Exit Sub
    End If

    If Forms![consignment sales allocations]![AllocationOnHold] = True Then
    MyMsgBox ("Sales line allocation on hold")
    Exit Sub
    End If

    Call CalcAllocationTotals

    If Nz(Tempused, 0) >= Nz(Forms![consignment sales allocations]![Text100], 0) Then
    MyMsgBox ("Fully allocated already")
    Exit Sub
    End If

    Dim QtyLeftToDo As Double
    QtyLeftToDo = Nz(Forms![consignment sales allocations]![Text100], 0) - Tempused

    Dim QtyTaken As Double

    Set cl = Me.RecordsetClone

    If cl.RecordCount = 0 Then
    MyMsgBox ("Nothing to allocated to")
    Exit Sub
    End If

    cl.close

    Dim Done As Boolean
    Dim Stopit As Boolean


    Set cl = Me.RecordsetClone
    cl.MoveFirst

    Stopit = False
    While Not Stopit
    If cl!PPStockOnHold = False Then
    If Nz(cl!PPQtyLeft, 0) > 0 Then
    If Nz(cl!TBAmount, 0) = 0 Then
    If Nz(cl!PPQtyLeft, 0) >= QtyLeftToDo Then
    Me.bookmark = cl.bookmark
    Me!TBAmount = QtyLeftToDo
    Call AutoTakeStock
    QtyLeftToDo = 0
    Stopit = True
    Else
    Me.bookmark = cl.bookmark
    Me!TBAmount = cl!PPQtyLeft
    Call AutoTakeStock
    QtyLeftToDo = QtyLeftToDo - cl!PPQtyLeft
    End If
    End If
    End If
    End If
    cl.MoveNext
    If cl.EOF = True Then
    Stopit = True
    End If
    Wend


    Me.Requery
    Me.Refresh
    Call CalcAllocationTotals

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Not a valid bookmark!!! Error msg (Access 2002)

    Where in the code does the error occur? Please try to provide specific information.

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Not a valid bookmark!!! Error msg (Access 2002)

    Another possible cause of that error is when you try to use a bookmark saved prior to a requery.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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