473,766 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting focus to control after navigating to next record...

3 New Member
My Access DB has a main data entry form. There are so many fields on the form that I've added a vertical scroll bar. When my cursor is in a text box near the bottom of the form and click on the navigation button to go to the next record, that same text box still has focus and all of the text in the next record is selected. To view the top of the form, I now have to scroll up.

What I want to have happen is this:
I click on the navigation button to show the next record and focus is placed on a control at the top of the form which, in effect, will scroll the form up for me...

But I can't find a click event for the parts of the navigation buttons so I can set focus to the control I want for that event.... how to do this....?
Barry
Oct 4 '07 #1
3 4968
missinglinq
3,532 Recognized Expert Specialist
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.   NameOfControlToGetFocus.SetFocus
  3. End Sub
Welcome to TheScripts!

Linq ;0)>
Oct 4 '07 #2
bcwatson
3 New Member
Nevermind... I found out how...
I went to the OnCurrent event for the form and set the focus to the proper control there...
Oct 4 '07 #3
bcwatson
3 New Member
Nevermind... I found out how...
I went to the OnCurrent event for the form and set the focus to the proper control there...
Yup! That's how I did it... Thanks anyway... and thanks for the very quick reply! I'll be back here again I'm sure...

Barry
Oct 4 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3657
by: MLH | last post by:
A form named frmVehicleEntryForm has a number of textbox controls who's OnGotFocus property setting is an expression... =Change2Green() Change2Green() looks something like this... Dim MyControl As Control Set MyControl = Screen.ActiveControl MyControl.BackColor = 65280 Tabbing from control-to-control is great. Each time I land on
5
1660
by: Prakash | last post by:
I have a continuous form in which I don't want to allow more than 255 rows. There is a field called sub_tran_no which is of the type "BYTE" & hence the restriction. My Problem: ----------- When I press the Dn-Arr & the no of transactions is >=254, the focus moves to the next
12
2066
by: Stephen Poley | last post by:
I have a report which prints data from a parent table and two child tables (Contract and Kosten). Because it is a bit long, I suppress some fields which are often empty, based on methods found in the archive for this group: allowing can-shrink on the field itself and the following code in the details section to suppress the label: If (Me!InpassingWerkproces.Text = "") Then Me!InpassingWerkproces_Bijschrift.Visible = False Else...
5
1365
by: Glenn T. Kitchen | last post by:
Hello All, Does anyone know how to set the focus to a textbox control on Page_Load? Thank you, Glenn
0
1545
by: LCAdeveloper | last post by:
Another newbie question I'm afraid. When I use the .Focus() or .Select() methods to set the initial control that has focus on a form, try as I might I cannot get the control to visually indicate that it has the focus (e.g. a dotted outline around the caption of a RadioButton). The visible and enabled properties are set to true, and I know that the desired control has the focus (in this case one of two or more RadioButtons located in a...
2
3139
by: mfleet1973 | last post by:
Hello (again), Within my datagrid I add a control to the datagridtextboxcolumn when the underlying textbox receives focus as follows: Combobox1.Size = New Size(Datagrid1.GetCurrentCellBounds().Width + 3, combobox1.Size.Height) sender.Controls.Add(Combobox1) This works great. The problem is that when focus is set on the
1
3451
by: JohnMOsborn | last post by:
I am designing an Access database that will use tab controls. Normally, you place different sets of fields on each page of the tab control – like Fields1-3 on Page 1, Fields 4-6 on Page 2, etc. In my database, however, I want to associate a particular numbered record of a field with each separate tab. In exploring my options, it looks like the best way to do this is to add a record-navigating “On Click” event to each separate page of the...
0
1445
by: Redback | last post by:
Im using VS 2005. I have a form with a tab control. I have text boxes which are bound to a binding source, which is bound to a dataset. I have a button on the form that allows the user to add a new record. On clicking the button, i add a new record to the binding source. i then wanted to update a number of the textboxes with a default value. At first I was just using a recursive function to loop through each control and
2
2773
by: angi35 | last post by:
I hope this is an easy question for someone out there. In Access 2000…I have a MainForm with a tab control (MAIN TABS) with 7 tabs. Within each tab is a SubForm. Within each SubForm is a tab control (TabCtl0) with 2-6 tabs. Within each TabCtl0, each tab contains a SubSubForm. Each record in the MainForm has an ID Number; the SubForms are bound to that ID Number, and the SubSubForms are bound to that ID Number in the SubForms. In order...
0
9571
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
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,...
0
10009
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7381
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
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
5279
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
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
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.