473,797 Members | 2,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(ByV al 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.RecordsetClo ne
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 2869

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

Similar topics

1
3585
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, after the data is massaged, I refresh it, which takes me to the first record on the subform. Instead, I need to return to the record I had showing on the subform when I clicked the button on the main form. Example: Customer= Main form. Orders =...
7
11191
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 subform in the Main form. I'd like to double click on the selected file in the listbox and load that record into the the Subform, easy
3
1841
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 the main form is a subform of bonds carried by those contractors. I am trying to reference a field named "Bond" located on the subform in code that is run from the mainform and am having trouble with the syntax for this. Below is a sample of...
1
5460
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") inside subform "sbfArtist" is another subform, "sbfTitle"... I'll try to create a visible heiarchy: frmStart ----frmCustomer --------sbfAddress --------sbfArtist
4
2016
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 recordsource so as to only pull 1 record. The table where the subform data comes from has 130,000 records. There is a parent/child link. Indexed on those fields. I have set the datasource to the table, SQL statements and a number of different queries...
14
4043
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 navigation buttons on the subform itself, but I would like to code to be global so I can reuse it in my many subforms. but only as a control in the partent form. So how can I change records in a control? I have tried to reference the...
13
3552
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 first 7 have to do with respondent information like grade, class and age. I have those in a table with a PK of RespondentId, which is autonumbered. Questions 8-40 all have the same format. For these questions I have a table set up with the...
1
2479
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 next record on that subform. This seems like that this should be a fairly easy thing to accomplish, but I cannot get it to reposition the cursor on the next record. The following is my code segment: Any help would be greatly appreciated!!! ...
2
5900
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 record in the subform so as to highlight it? I did originally have this code in the subform but (of course) using the Bookmark property in its Current event made it impossible to move away from the offending record! Many thanks. Keith.
0
9536
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10205
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5458
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4131
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.