473,426 Members | 1,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

How to make subform scroll upwards after setting bookmark?

I'm doing the bookmark thing to force the current record in a subform
and it works....almost.

Problem is that the subform then scrolls so that the newly-selected
field is at the very top of the form. We don't want that. Instead,
we want the from to be scrolled to the very top (there are a limited
number of rows...so there's no problem with the newly-selected row
being somewhere off the bottom of the form).

Anybody done this?

Existing Code:
-----------------------------------------
Public Sub FieldLocate(ByVal theFieldName As String)
debugStackPush Me.Name & ": FieldLocate"
On Error GoTo FieldLocate_err

' PURPOSE: To enable us to keep focus on the same row as user moves
from
' Cusip to Cusip or as we pop the Zoom screen and return
focus
' to this screen

Dim myRS As DAO.Recordset
Dim myBookMark As Variant

Set myRS = Me.RecordsetClone
With myRS
.FindFirst "FieldName='" & theFieldName & "'"
If Not .NoMatch = True Then
myBookMark = .Bookmark
Me.Bookmark = myBookMark
End If
End With

FieldLocate_xit:
debugStackPop
On Error Resume Next
myRS.Close
Set myRS = Nothing
Exit Sub

FieldLocate_err:
bugAlert True, ""
Resume FieldLocate_xit
End Sub
-----------------------------------------
Nov 12 '05 #1
0 2846

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Txsg8r | last post by:
I have a main form with a subform on it. When I click a button on the main form, I perform some calculations on data contained in the subform's table (all related records actually). However,...
7
by: ChrisR | last post by:
Hi guys My app is a simple Main form with a few Subforms that are not linked, and a few pop forms. Problem is: I have a pop form with a Listbox with a list of records related to the...
3
by: Kranman | last post by:
Hi All, Love this site, have gotten a lot from it. This is my first time posting though, so forgive me for any errors. I have an Access 2000 db where I have a main form of Contractors and on...
1
by: tizmagik | last post by:
I have a Starting form ("frmStart") and a main form ("frmCustomer") inside frmCustomer are two subform, one with it's own subform. So frmCustomer has two subforms ("sbfArtist" and "sbfAddress")...
4
by: aqua404 | last post by:
I know this has been discussed, but I can't find a resolution. I have a subform on a form. The table with the data for the main form has 15,000 records. I am opening and then setting...
14
by: Rational Repairs | last post by:
I am trying to create global code for navigation use in all my forms -- including subforms. I searched, and searched, but can not find how to globally reference a subform object. I need to have the...
13
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The...
1
by: stuart | last post by:
I have a list of records in a subform that a user can either edit or delete. This is an unbound form. If the user deletes a record, I want to refresh the form, and then position the cursor on the...
2
by: Keith Wilby | last post by:
I have developed an appointments system database and I use the attached code in the main form's current event to detect appointment clashes in the subform. Is it possible to go to the offending...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.