Lost Focus

Bookmark won't work for you due to your design.

What's wrong with the design. In all my classes and being train I was told you create forms from a table or query. Use unbound forms to filter or search specific fields.

You have to be more basic with me--I'm no where near a tech guru--more of a end-user of Access.
 
There's no need changing your design now because your three forms are tied together. Stick with FindFirst and use pbaldy's code. I don't think you've even researched FindRecord I mentioned earlier?
 
There's no need changing your design now because your three forms are tied together. Stick with FindFirst and use pbaldy's code. I don't think you've even researched FindRecord I mentioned earlier?

No--been to busy looking up recordset.bookmark stuff. I was looking for a quick answer but ended up spending the day reading the many, many, many post re bookmarks. Anyway, I got stop because I am so behind on other tasks. Now I see why so many databases are hard to use--not that user friendly--it's so much stuff to learn and do to make it easier to use. My eyes want way more than I am capable of doing right now.
 
It will come in handy, no knowledge is wasted knowledge.

Sleep over it and tackle the FindFirst method. For the Gotorecord, you need to save the CurrentRecord (as in Me.CurrentRecord obviously depending on where you're calling it from) before requerying, then use the variable (Long type) in Gotorecord after requerying.
 
Oh, I was thinking you would go for a FindFirst option, but never mind. Here are the three lines I mentioned:
Code:
On Error GoTo ErrorHandler
    
    dim bkMark as String

    If CurrentProject.AllForms("frmViewEventHistory").IsLoaded Then
        bkMark = Forms!frmViewEventHistory.bookmark
        Forms!frmViewEventHistory.Requery
        Forms!frmViewEventHistory.bookmark = bkMark
    End If

Hey vbaInet,

You must like confusing me. The link you gave me to the Requery with bookmark by Baldy Web does not work for this form.

Actually, the above code works. There is just two problems; they are:

1) If you delete the first record, you get: Error: Not a valid book. Error Number: 3159.

2) If you delete the only entry on the form, you get: Error: Not a valid book. Error Number: 3159.

For 1 and 2 I noticed it moves up a row when returning--going back to frmViewEventHistory.
 

Users who are viewing this thread

Back
Top Bottom