CodeConnect.Net Beta


   Explore    Entry   Register  Login  
windowsxp-general
access
windows-vista-mail
windows-vista-general
windowsupdate
windowsmedia-player
access-forms
windows-live-mail-desktop
windowsxp-help_and_support
access-queries
access-modulesdaovba
access-formscoding
windows-server-sbs
windows-server-general
access-reports
windows-vista-music_pictures_video
windowsce-platbuilder
windows-live-messenger
windows-terminal_services
windows-powershell
windows-server-active_directory
access-gettingstarted
windows-mediacenter
windowsxp-hardware
windowsxp-network_web
windows-64bit-general
windows-live-sync
windows-vista-hardware_devices
windows-inetexplorer-ie6_outlookexpress
windows-group_policy
windows-server-networking
windows-vista-installation_setup
windows-vista-networking_sharing
windowsxp-basics
access-tablesdbdesign
windowsxp-perform_maintain
windows-vista-performance_maintenance
windows-networking-wireless
windows-vista-file_management
windows-inetexplorer-ie6-browser
windows-server-dns
windows-server-update_services
windows-vista-security
windows-vista-administration_accounts_passwords
windows-vista-games
windows-file_system
access-activexcontrol
windows-live-foldershare
windows-live-photogallery
access-developers-toolkitode
access-conversion




Can Reply:  Yes Members Can Edit: No Online: Yes
Zone: > Microsoft News > microsoft.public.access.forms Tags:
Item Type: Date Entered: 11/11/2009 4:48:07 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 91 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
=?Utf-8?B?Q2h1Y
NewsGroup User
Where is the next control identified?11/11/2009 4:48:07 AM
Reply

0

Screen.PreviousControl.Name provides the name of the control that last had
the focus. That's nice if you need to know where control came from, but
there doesn't seem to be a Screen.NextControl.Name or anything similar.

I have code that is executed OnLostFocus in which I would like to save the
name of the control that will be receiving the focus. This would allow me to
force the focus to some other control and then, after the required processing
of that control has finished, restore the focus to the control indicated by
the user.
Tom van Stiphou
NewsGroup User
Re: Where is the next control identified?11/11/2009 5:13:03 AM
Reply

0

On Tue, 10 Nov 2009 20:48:07 -0800, Chuck
<Chuck@discussions.microsoft.com> wrote:

A simple solution would be to iterate over the Controls collection,
checking the TabIndex property:
dim ctl as control
for each ctl in me.controls
if ctl.TabIndex = Me.myControl.TabIndex + 1 then Msgbox "The next
control is " & ctl.Name
next
(of course you replace myObjectNames with yours)

Oh, but what if I used the mouse to move focus 3 controls ahead?

Your requirement is VERY curious. I think you are saying that when I
tab out of a control, you want OnLostFocus set focus somewhere else,
then set it to where I wanted to go in the first place. What's the
point of this side-step? Which would probably only last milliseconds?
Show us some code (stripped to the bare essentials) and we may be able
to suggest a better way.

-Tom.
Microsoft Access MVP


>Screen.PreviousControl.Name provides the name of the control that last had
>the focus. That's nice if you need to know where control came from, but
>there doesn't seem to be a Screen.NextControl.Name or anything similar.
>
>I have code that is executed OnLostFocus in which I would like to save the
>name of the control that will be receiving the focus. This would allow me to
>force the focus to some other control and then, after the required processing
>of that control has finished, restore the focus to the control indicated by
>the user.
2 Items, 1 Pages 1 |< << Go >> >|







Similar:

automatically populate a field based on 2 others

creating a form from a table 2003

referencing subform control on main form

combo box menu selection problem

cascading combo boxes and populating a form

checking a field in a form before update

a2007 images in continuious forms

expiry dates query

default value on continuous form

use listbox selection for query criteria

requery subform not working

email using outlook

how can you set tabs between subforms so they will tab to next for

pop-up forms

form to display result

continuous forms

form defaults to a different record when updated.

form to multiple tables issues

calculating "workdays" in an access 2007 form?

after update event

marking items as selected in a muli-select listbox

if, then, else

access xp form with lookup

text box formatting

if subform dirty, field in main form visible

create form using query doesn't fill fields

total package per day and per hour

conditional formatting with sql select from another table

where can i find background picture used in forms in nortwind 2007

cascading?

combo box auto expand

creating top 10 in linked subform

settempvars

how to undo subform ?

forms & subforms

pop up form question

combo boxes & requery issues

error message for dlookup

forms in excel

my form control buttons in access 2007 don't work

creating "key" fields when met, unlock the next step...

access database size limits linking to sql server

help: issue when exporting a hyperlinked field to word or excel

auto populate multiple records in subform

where is the next control identified?

populating field

problem with filling form using query?

presentacion

on current type mismatch error

want a parameter for date range driving a cross tab query

   
  Privacy | Contact Us
All Times Are GMT