Re: How do you compare bookmarks in DAO recordsets?
- From: "David Anderson" <DavidAnderson@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 12 Jun 2005 10:36:01 -0700
I didn't quite understand Albert's suggestion of modifying the Findfirst
conditions, but Van Dinh's last post made it clear how I could avoid
comparing bookmarks and compare primary key fields instead. This method works
fine!
I'm still at a loss as to why the bookmark comparison is unreliable, but I'm
a practical guy - I now have a solution and I can stop worrying about
bookmarks.
Thanks to everyone for all the assistance.
"Marshall Barton" wrote:
> Interesting?? I hadn't stumbled over that KB article
> before.
>
> Have you been able to identify any unusual circumstances
> related to the problem? Did stepping through the code
> provide any clues?
>
> Maybe you can avoid the problem using Albert's idea by
> comparing the PK fields of the two recordsets.
> --
> Marsh
> MVP [MS Access]
>
>
> David Anderson wrote:
> >I posted my problem on another Access forum and got a response providing a
> >link to this MS Knowledgebase article:
> >
> >http://support.microsoft.com/default.aspx?scid=kb;en-us;198648
> >
> >The article acknowledges a Type Mismatch problem when comparing bookmarks.
> >The resolution is to do a binary comparison using the StrComp function.
> >Sadly, however, while this is a more elegant solution than my own workaround
> >it does not make my code any more reliable. It still fails in just the same
> >way as before.
> >
> >By the way, my problem is not random. Every time I go through the same set
> >of actions with my form it's always at the same place that it first tells me
> >(wrongly) that the form is already at the selected record.
> >
> >
> >"Marshall Barton" wrote:
> >> I think the only way you can get that error is if one of the
> >> bookmarks is Null. I'm not sure how that can happen, maybe
> >> an empty reordset??
> >>
> >> I suggest that you place breakpoints in the procedure and
> >> step through the code to see where each value is
> >> set/changed/cleared.
> >>
> >>
> >> David Anderson wrote:
> >> >Marshall, my real code is almost identical to your suggestion, with the
> >> >exception that I save the bookmarks to string variables before comparing
> >> >them. Doing the comparison directly, as in "If .Bookmark = Me.Bookmark Then",
> >> >gives a Type Mismatch error. Bookmarks appear to be rather strange things
> >> >......
>
>
.
- References:
- How do you compare bookmarks in DAO recordsets?
- From: David Anderson
- Re: How do you compare bookmarks in DAO recordsets?
- From: Marshall Barton
- Re: How do you compare bookmarks in DAO recordsets?
- From: David Anderson
- Re: How do you compare bookmarks in DAO recordsets?
- From: Marshall Barton
- Re: How do you compare bookmarks in DAO recordsets?
- From: David Anderson
- Re: How do you compare bookmarks in DAO recordsets?
- From: Marshall Barton
- Re: How do you compare bookmarks in DAO recordsets?
- From: David Anderson
- Re: How do you compare bookmarks in DAO recordsets?
- From: Marshall Barton
- How do you compare bookmarks in DAO recordsets?
- Prev by Date: Re: Conditional formating but using limits from a table
- Next by Date: Print Letters with Mail Merge using VBA
- Previous by thread: Re: How do you compare bookmarks in DAO recordsets?
- Next by thread: Re: How do you compare bookmarks in DAO recordsets?
- Index(es):
Relevant Pages
|