473,406 Members | 2,894 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,406 software developers and data experts.

[Help] SetFocus method

Alias90
23
Hi Everybody!

Maybe this is stupid question.'Cause i am newbie in Access.
I had a problem with setfocus method.In textbox_AfterUpdate Event(txtkanban_AfterUpdate), i coded :
Expand|Select|Wrap|Line Numbers
  1. Me.txtkanban=""
  2. Me.txtkanban.SetFocus
However, the cursor removed to the another commandButton(cmdEdit)
in design form, tab order i chosen :
1.txtkanban
2.txttong
3.cmdEdit

Thank U in Advance
Jul 25 '12 #1
3 2056
twinnyfo
3,653 Expert Mod 2GB
Alias90,

I am unable to duplicate your results.... Are you sure that the TabStop property for txttong and cmdEdit are set to yes? This could be your problem....
Jul 25 '12 #2
Alias90
23
twinnnyfo!!! Thank u so much
I'm sorry.Yes, i had mistake. I have chosen 1.txtkanban 2.cmdEdit 3.txttong. But when i chose again 1.txtkanban 2.txttong 3.cmdEdit . the cursor move to txttong. So my purpose is cursor move to txtkanban again. So i don't know to sovle it now. Somebody help me,pleaze!
Jul 26 '12 #3
twinnyfo
3,653 Expert Mod 2GB
Alias90,

Hmmmmmmmm. Part of me wonders why you would have code like this, to enter a value into a text box, then simply clear it out after you enter it? I can speak with certainty, but it appears that once you update a control, you can't simply reset the focus to it, you must set it elsewhere first. This would not be the first quirky aspect of Access.

I know a workaround is to set the focus to another control, then set it back to the original control. Which works, but from a programmer's standpoint, is mindless....

If the only goal in this is to clear the contents of txtkanban and set the focus to that control, this will work, but still unsure of the purpose.

See below:

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Private Sub txtkanban_AfterUpdate()
  5.     Me.txtkanban = ""
  6.     Me.txttong.SetFocus
  7.     Me.txtkanban.SetFocus
  8. End Sub
  9.  
Hope this solves your problem.....
Jul 26 '12 #4

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

Similar topics

2
by: daniel.w.gelder | last post by:
Hey again. I'm still working on my functor class, and now it works with method functions too; you pass it the method function, as well as the object you want to be 'this' when the method is...
4
by: Corepaul | last post by:
I am a newbie using Access 2000. I am using the following test in the txtAlbum OnExit procedure to prevent leaving an empty text box for a required field If (IsNull(txtAlbum.Value)) Or...
1
by: Gordon Keeler | last post by:
Hi all. I'm trying to develop an automated method of converting Access (97 or 2000) databases to SAS using DBMSCopy. I've discovered that there is not a rigid standard set to control the naming...
1
by: Jack Addington | last post by:
I am just looking for some advice on naming my methods - I am getting confused as to what some of them mean now I have the following scenario - A Visual Data Object and a Logical Data Object. ...
2
by: Anthony Nystrom | last post by:
Can someone please help me with this... Here is the method and what it needs: Public Sub xyz(sender as object, cbaevent as System.Drawing.Printing.PrintPageEventArge) I am looking for and...
1
by: Chris Calzaretta | last post by:
Hello, I need help with method descriptions for example when i say public var as new object.class and i go var.classmethod
3
by: Jim Devenish | last post by:
In my application vehicles arrive and depart from a workshop. The ArrivalDate and the HandoverDate are each entered. Sometimes the person who should enter the arrival date forgets to do so. ...
6
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post by:
The HP t5520 Windows CE based thin client comes with a browser called 'Internet Explorer' - iehp.exe. It appears to have Java script (Request.Browser.JavaScript = True). I want to use this browser...
0
by: nagar | last post by:
On some PCs I have my application completely crash (with the standard Windows message) when I make a call to the Help.ShowHelp method to display the help guide Here's the call I make. Form...
9
by: ITHELP85 | last post by:
I have a method that returns an ArrayList and in the Main method i want to convert that list to an array. public static void main (String args) { **How can I turn the scoresList which is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...
0
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...
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
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...

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.