Scrolling Forms

B

Brian

I have a scrolling form from which displays various
information about part numbers...part number, description,
lead time, etc. Clicking on the part number calls up a
form on which the data can be edited. However, in order
to display the correct information on the scrolling form,
the form must be requeried. The problem is that once the
form is requeried, the form moves back to the 1st part
number on the list.

Our engineers often make changes to multiple part numbers
and having to scroll throuh 5000+ parts looking for where
you were before, although easy, is still time consuming.
Does anyone know of a way of automatically returning the
scrolling form back to the same position it was prior to
the requery? I would prefer some sort of VB coding answer
to this question if at all possible.

Thanks in advance to anyone who can help me out.
 
M

Marshall Barton

Brian said:
I have a scrolling form from which displays various
information about part numbers...part number, description,
lead time, etc. Clicking on the part number calls up a
form on which the data can be edited. However, in order
to display the correct information on the scrolling form,
the form must be requeried. The problem is that once the
form is requeried, the form moves back to the 1st part
number on the list.

Our engineers often make changes to multiple part numbers
and having to scroll throuh 5000+ parts looking for where
you were before, although easy, is still time consuming.
Does anyone know of a way of automatically returning the
scrolling form back to the same position it was prior to
the requery? I would prefer some sort of VB coding answer
to this question if at all possible.


Save the records PK before opening the other form and use
that in a FindFirst after the requery.

Dim CurRec As Long

CurRec = Me.txtPK
DoCmd.OpenForm "formname", WindowMode:=acDialog
Me.Requery
With Me.RecordsetClone
.FindFirst "PK = " & CurRec
If Not .NoMatch Then Me.Bookmark = .Bookmark
End With
 

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

Top