Not a Valid Bookmark

C

CaptainBly

I am getting the Not a Valid Bookmark error but it doesn't seem like it
is the same issue that I have been researching in this group.

I have a pretty straightforward order entry program. Basically two
tables. The Order Header, and the Order Lines. I am using bound
forms. I have a main form with all the demographic customer, date,
etc... data on it and a subform with the items that are going to be on
the order.

The users are typing in hundreds of orders each day. Once or twice a
day they will get the Not a Valid Bookmark error and they have to end
task to get out.

The problem is, I never am referencing a bookmark in any of my code.
It always seems to happen when they go from the main form to the detail
subform and on new orders only.

It is as if the saving of the record on the main form is causing this
error somehow. The orderheader record is in the table still though and
if they go back in they can pull it up and use it and type in lines for
the order.

The database is not corrupted. Well at least it doesn't seem to be. I
have no other issues with it. Just 2 or 3 times a day this happens,
they end task, go back in and everything is fine.

I have no code on the on open or on current events of my subform that
is of any real consequence. I am locking some of the fields, setting
tabstops on or off, and requerying drop down boxes on the subform based
on the type of order but no significant code.

Just can't figure out why this is popping up sporadically a couple of
times a day.

Any help would be greatly appreciated.
 
A

Allen Browne

Suggestions:

1. Compact the database:
Tools | Database Utilities | Compact
If the problem is a bad index, this should solve the problem.

2. It seems like you have multiple users in this database. Spit it, so that
the tables are in a mdb in a shared location, but each user has a copy of
the application with the linked tables. If this is a new concept, see:
http://allenbrowne.com/ser-01.html

3. Assuming Access 2000 or later, make sure that all users have the same
version of msjet40.dll (typically found in windows\system32.) Right-click
the file, and choose Properties. On the Version tab should should see
4.0.8xxx.0. The xxx digits don't matter, and Windows 2000 machines may show
a 9, but if any machines have a lower number, download JET 8 SP8 from:
http://support.microsoft.com/kb/239114

4. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Compact again.
Explanation of why:
http://allenbrowne.com/bug-03.html

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
and the code syntax is compilable.

If the problem still occurs, it is time to examine the code associated with
these forms. Particularly, add an explicit save before any thing that
requires Access to save the record, such as applying a filter, changing the
sort order, finding another record, closing the form, changing the
RecordSource, ... The explicit save can be as simple as:
If Me.Dirty Then Me.Dirty = False

If you are still stuck, it could be a hardware issue (typically network
card.)
 
C

CaptainBly

Thanks for getting back to me.

1) I compact/Repair this database each night as a maintenance routine
2) It is split into a front end locally as an MDE with most users using
run time and a back end on the server.
3) I checked one users MSJET and they had a 4.0.9025.0. Mine is
4.0.8618.0. I will check all users for this though.
4) I will do the autocorrect
5) I already have minimized my references
6) program compiles and can make MDE with no issues.

I saw that Autocorrect option somewhere else as well, maybe another of
your posts, and thought that was an interesting thing. That is about
the only thing I have seen that seems possibly out of the ordinary.

I will try it and see what it does. Thanks for your detailed response.
 
A

Allen Browne

Okay, you have most of that down.

As well as dealing with Name AutoCorrupt, check for cases where the explicit
save is needed.

Do you know which event is giving this error? It could be informative to
know what is happening at the time. Logging the events is much more reliable
that asking users to tell you, of course.
 
C

CaptainBly

To be honest with you, I wasn't even aware it was happening. I am a
contract developer for this client but they do general support in house
and no one had told me about it. It is so sporadic I hadn't gotten
into that level of detail of checking yet, just seeing what others had
experienced.

I did put saves in a few spots of the data entry on the header already
and am hoping that might help out.

It is happening as they press the tab key from the last field on the
main form to go to the subform. The subform has a current event but
does very little. Based on the type of order (Order or Return) it
locks some fields and takes them out of the tab order so the user can't
get in them and it requery's some of the drop down boxes that are
filled based on user entry on the main form. Nothing ridiculous at
all.

The before update of the main form writes a record into an "orderlocks"
table that I use to make sure no one else is editing this order at the
same time.

I just tested something and the current event doesn't even run in the
subform when they go from the last field on the main form to the
subform. That is pointing me back to my beforeupdate of the main form
which is running my locks table logic. I rewrote that and am going to
see if that solves my issue.

Thanks again for your help. Hopefully that will solve it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

not a valid bookmark 2
"Not a valid bookmark" error 7
Invalid Bookmark Error 2
Not a Valid Bookmark 1
Not a Valid Bookmark error 4
Not a valid bookmark 4
bookmark in subform 2
Not a valid bookmark 1

Top