PC Review


Reply
Thread Tools Rate Thread

Bookmark Issue

 
 
GLT
Guest
Posts: n/a
 
      3rd Feb 2010
Hi,

I had this working perfectly a while ago, and I've made some change and now
its not working. After my mainform went to the same record as my unbound
subform, my subform would stay on its selected record. Now it goes way back
to the 1st record, very annoying for a list thats 300 records long.

Can anyone advise how to fix this?

Cheers,

Sub Form_Click()
Dim rs As DAO.Recordset
If Me.Parent.Dirty Then
Me.Parent.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
Set rs1 = Me.Parent.RecordsetClone


rs.FindFirst "[RecID] = '" & Me.RecID & "'"
rs1.FindFirst "[RecID] = '" & Me.RecID & "'"

If Not rs.NoMatch Then
Me.Parent.Bookmark = rs1.Bookmark 'reposition the form
Me.Parent![ServerList].Requery
Me.Bookmark = rs.Bookmark
Me.Requery
End If
Set rs = Nothing
Set rs1 = Nothing

End Sub
 
Reply With Quote
 
 
 
 
Daryl S
Guest
Posts: n/a
 
      3rd Feb 2010
GLT -

I suspect it is the Me.Requery after the Me.Bookmark = rs.Bookmark.
--
Daryl S


"GLT" wrote:

> Hi,
>
> I had this working perfectly a while ago, and I've made some change and now
> its not working. After my mainform went to the same record as my unbound
> subform, my subform would stay on its selected record. Now it goes way back
> to the 1st record, very annoying for a list thats 300 records long.
>
> Can anyone advise how to fix this?
>
> Cheers,
>
> Sub Form_Click()
> Dim rs As DAO.Recordset
> If Me.Parent.Dirty Then
> Me.Parent.Dirty = False
> End If
> 'Search in the clone set.
> Set rs = Me.RecordsetClone
> Set rs1 = Me.Parent.RecordsetClone
>
>
> rs.FindFirst "[RecID] = '" & Me.RecID & "'"
> rs1.FindFirst "[RecID] = '" & Me.RecID & "'"
>
> If Not rs.NoMatch Then
> Me.Parent.Bookmark = rs1.Bookmark 'reposition the form
> Me.Parent![ServerList].Requery
> Me.Bookmark = rs.Bookmark
> Me.Requery
> End If
> Set rs = Nothing
> Set rs1 = Nothing
>
> End Sub

 
Reply With Quote
 
GLT
Guest
Posts: n/a
 
      3rd Feb 2010
I tried commenting out the following:

> > Me.Parent![ServerList].Requery
> > Me.Bookmark = rs.Bookmark
> > Me.Requery


Its still doing it .... grrrrr

"Daryl S" wrote:

> GLT -
>
> I suspect it is the Me.Requery after the Me.Bookmark = rs.Bookmark.
> --
> Daryl S
>
>
> "GLT" wrote:
>
> > Hi,
> >
> > I had this working perfectly a while ago, and I've made some change and now
> > its not working. After my mainform went to the same record as my unbound
> > subform, my subform would stay on its selected record. Now it goes way back
> > to the 1st record, very annoying for a list thats 300 records long.
> >
> > Can anyone advise how to fix this?
> >
> > Cheers,
> >
> > Sub Form_Click()
> > Dim rs As DAO.Recordset
> > If Me.Parent.Dirty Then
> > Me.Parent.Dirty = False
> > End If
> > 'Search in the clone set.
> > Set rs = Me.RecordsetClone
> > Set rs1 = Me.Parent.RecordsetClone
> >
> >
> > rs.FindFirst "[RecID] = '" & Me.RecID & "'"
> > rs1.FindFirst "[RecID] = '" & Me.RecID & "'"
> >
> > If Not rs.NoMatch Then
> > Me.Parent.Bookmark = rs1.Bookmark 'reposition the form
> > Me.Parent![ServerList].Requery
> > Me.Bookmark = rs.Bookmark
> > Me.Requery
> > End If
> > Set rs = Nothing
> > Set rs1 = Nothing
> >
> > End Sub

 
Reply With Quote
 
Daryl S
Guest
Posts: n/a
 
      3rd Feb 2010
GLT -

I think you still want the bookmark statement in there:

Me.Bookmark = rs.Bookmark


--
Daryl S


"GLT" wrote:

> I tried commenting out the following:
>
> > > Me.Parent![ServerList].Requery
> > > Me.Bookmark = rs.Bookmark
> > > Me.Requery

>
> Its still doing it .... grrrrr
>
> "Daryl S" wrote:
>
> > GLT -
> >
> > I suspect it is the Me.Requery after the Me.Bookmark = rs.Bookmark.
> > --
> > Daryl S
> >
> >
> > "GLT" wrote:
> >
> > > Hi,
> > >
> > > I had this working perfectly a while ago, and I've made some change and now
> > > its not working. After my mainform went to the same record as my unbound
> > > subform, my subform would stay on its selected record. Now it goes way back
> > > to the 1st record, very annoying for a list thats 300 records long.
> > >
> > > Can anyone advise how to fix this?
> > >
> > > Cheers,
> > >
> > > Sub Form_Click()
> > > Dim rs As DAO.Recordset
> > > If Me.Parent.Dirty Then
> > > Me.Parent.Dirty = False
> > > End If
> > > 'Search in the clone set.
> > > Set rs = Me.RecordsetClone
> > > Set rs1 = Me.Parent.RecordsetClone
> > >
> > >
> > > rs.FindFirst "[RecID] = '" & Me.RecID & "'"
> > > rs1.FindFirst "[RecID] = '" & Me.RecID & "'"
> > >
> > > If Not rs.NoMatch Then
> > > Me.Parent.Bookmark = rs1.Bookmark 'reposition the form
> > > Me.Parent![ServerList].Requery
> > > Me.Bookmark = rs.Bookmark
> > > Me.Requery
> > > End If
> > > Set rs = Nothing
> > > Set rs1 = Nothing
> > >
> > > End Sub

 
Reply With Quote
 
GLT
Guest
Posts: n/a
 
      4th Feb 2010
Hi Daryl, Thanks for your reply - I tried uncommenting

Me.Bookmark = rs.Bookmark

And it is till doing it. This is very frustrating...


"Daryl S" wrote:

> GLT -
>
> I think you still want the bookmark statement in there:
>
> Me.Bookmark = rs.Bookmark
>
>
> --
> Daryl S
>
>
> "GLT" wrote:
>
> > I tried commenting out the following:
> >
> > > > Me.Parent![ServerList].Requery
> > > > Me.Bookmark = rs.Bookmark
> > > > Me.Requery

> >
> > Its still doing it .... grrrrr
> >
> > "Daryl S" wrote:
> >
> > > GLT -
> > >
> > > I suspect it is the Me.Requery after the Me.Bookmark = rs.Bookmark.
> > > --
> > > Daryl S
> > >
> > >
> > > "GLT" wrote:
> > >
> > > > Hi,
> > > >
> > > > I had this working perfectly a while ago, and I've made some change and now
> > > > its not working. After my mainform went to the same record as my unbound
> > > > subform, my subform would stay on its selected record. Now it goes way back
> > > > to the 1st record, very annoying for a list thats 300 records long.
> > > >
> > > > Can anyone advise how to fix this?
> > > >
> > > > Cheers,
> > > >
> > > > Sub Form_Click()
> > > > Dim rs As DAO.Recordset
> > > > If Me.Parent.Dirty Then
> > > > Me.Parent.Dirty = False
> > > > End If
> > > > 'Search in the clone set.
> > > > Set rs = Me.RecordsetClone
> > > > Set rs1 = Me.Parent.RecordsetClone
> > > >
> > > >
> > > > rs.FindFirst "[RecID] = '" & Me.RecID & "'"
> > > > rs1.FindFirst "[RecID] = '" & Me.RecID & "'"
> > > >
> > > > If Not rs.NoMatch Then
> > > > Me.Parent.Bookmark = rs1.Bookmark 'reposition the form
> > > > Me.Parent![ServerList].Requery
> > > > Me.Bookmark = rs.Bookmark
> > > > Me.Requery
> > > > End If
> > > > Set rs = Nothing
> > > > Set rs1 = Nothing
> > > >
> > > > End Sub

 
Reply With Quote
 
Daryl S
Guest
Posts: n/a
 
      5th Feb 2010
GLT -

Have you stepped through the code to see what is happening? You can set a
breakpoint on the first executable statement in the code, and then see what
statements it is executing. If the rs1.findfirst working (e.g. is a match
found)?

--
Daryl S


"GLT" wrote:

> Hi Daryl, Thanks for your reply - I tried uncommenting
>
> Me.Bookmark = rs.Bookmark
>
> And it is till doing it. This is very frustrating...
>
>
> "Daryl S" wrote:
>
> > GLT -
> >
> > I think you still want the bookmark statement in there:
> >
> > Me.Bookmark = rs.Bookmark
> >
> >
> > --
> > Daryl S
> >


 
Reply With Quote
 
GLT
Guest
Posts: n/a
 
      8th Feb 2010
Hi Daryl,

Just wanted to let you know that the issue wound up being a query problem.

I added a combox box to my form, and refrenced the value of the combo box to
the same underlying query that the form was working off (kind of circular
refrence thing). because of this, the bookmarks stopped working.

Cheers,
GT.



"Daryl S" wrote:

> GLT -
>
> Have you stepped through the code to see what is happening? You can set a
> breakpoint on the first executable statement in the code, and then see what
> statements it is executing. If the rs1.findfirst working (e.g. is a match
> found)?
>
> --
> Daryl S
>
>
> "GLT" wrote:
>
> > Hi Daryl, Thanks for your reply - I tried uncommenting
> >
> > Me.Bookmark = rs.Bookmark
> >
> > And it is till doing it. This is very frustrating...
> >
> >
> > "Daryl S" wrote:
> >
> > > GLT -
> > >
> > > I think you still want the bookmark statement in there:
> > >
> > > Me.Bookmark = rs.Bookmark
> > >
> > >
> > > --
> > > Daryl S
> > >

>

 
Reply With Quote
 
Daryl S
Guest
Posts: n/a
 
      8th Feb 2010
Great - thanks for the update!

--
Daryl S


"GLT" wrote:

> Hi Daryl,
>
> Just wanted to let you know that the issue wound up being a query problem.
>
> I added a combox box to my form, and refrenced the value of the combo box to
> the same underlying query that the form was working off (kind of circular
> refrence thing). because of this, the bookmarks stopped working.
>
> Cheers,
> GT.
>
>
>
> "Daryl S" wrote:
>
> > GLT -
> >
> > Have you stepped through the code to see what is happening? You can set a
> > breakpoint on the first executable statement in the code, and then see what
> > statements it is executing. If the rs1.findfirst working (e.g. is a match
> > found)?
> >
> > --
> > Daryl S
> >
> >
> > "GLT" wrote:
> >
> > > Hi Daryl, Thanks for your reply - I tried uncommenting
> > >
> > > Me.Bookmark = rs.Bookmark
> > >
> > > And it is till doing it. This is very frustrating...
> > >
> > >
> > > "Daryl S" wrote:
> > >
> > > > GLT -
> > > >
> > > > I think you still want the bookmark statement in there:
> > > >
> > > > Me.Bookmark = rs.Bookmark
> > > >
> > > >
> > > > --
> > > > Daryl S
> > > >

> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
link from outlook to word bookmark opens doc but not at bookmark JOH Microsoft Outlook 1 2nd May 2008 03:58 AM
.Bookmark = .RecordsetClone.Bookmark =?Utf-8?B?cmVkRnJlZA==?= Microsoft Access Form Coding 3 19th Oct 2007 07:19 PM
Bookmark page rather than bookmark site =?Utf-8?B?RG91ZyBTdGV3YXJ0?= Microsoft Frontpage 7 4th Mar 2007 05:00 PM
My noteref to valid bookmark says "Error! Bookmark not defined."? =?Utf-8?B?amNoaWxkZXJzXzk4?= Microsoft Word Document Management 3 5th Oct 2006 02:23 PM
Bookmark issue =?Utf-8?B?NTQgcGVha3M=?= Microsoft Word Document Management 6 27th Apr 2004 08:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:24 AM.