473,976 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

setfocus to access application

Gil
can you set focus to the current access application through vba?
lets say i tell access to open another application and that new
application gains the focus and causes access to loose the focus. can
access reset the focus back to its current access application after
loosing its focus?
docmd.select object or me.setfocus doesnt seem to work. what it does it
set the highlet on a textbox within the form but the form is still not
selected.
any ideas?
thanks!

Dec 21 '05 #1
2 6186
Gil wrote:
can you set focus to the current access application through vba?
lets say i tell access to open another application and that new
application gains the focus and causes access to loose the focus. can
access reset the focus back to its current access application after
loosing its focus?
docmd.select object or me.setfocus doesnt seem to work. what it does it
set the highlet on a textbox within the form but the form is still not
selected.
any ideas?
thanks!

I might check out http://www.mvps.org/access and scan through the API's.
I'm not sure why you'd want to open an app and keep the focus there
since one can hit the access button on the start bar and if Access is
minimized you might not see the other app. At the Access web site
listed there is a method to open files and you can tell it to open
maximized or minimized.
Dec 21 '05 #2
Gil
thanks i will check it out.
the reason i want to this is because i call mappoint to fetch the
milelage between two address and i want it to happen while still in
access, even though mappoint must be open

Dec 21 '05 #3

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

Similar topics

4
10200
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 (Len(txtAlbum.Value) < 1) Then MsgBox("Album Title cannot be empty") txtAlbum.SetFocus End If
3
2506
by: Eric | last post by:
Hi, I wrote a Sub to run "Find and Replace" menu command on Access 2000. It worked fine except SetFocus didn't work. It changed position from time to time. I need the Focus always set at field Here is the Sub: 'Find What: Need Code to SetFocus here??? 'Look In: current field only 'Match: Any Part of Field
7
3325
by: Anthony Hendrata | last post by:
Hello All, I know this may be easy for some people, but I need some help on a little programming. I have this application that has been developed in Access, there is a textbox call FindByName and a command button called cmdFilter. What I would like to do is that when a user begins typing in the textbox, that the focus would be on the command button. Then when they hit the enter key it will hit the command button. If you guys could help...
3
6689
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. When the vehicle is handed over to the customer and the HandoverDate is entered I wish to warn about the possibly missing ArrivalDate. In the BeforeUpdate event of HandoverDate I have: Private Sub HandoverDate_BeforeUpdate(Cancel As Integer) If...
4
2648
by: =?Utf-8?B?am9zZXJhbW9uYnJhdm8=?= | last post by:
I use a CDialog with several controls and I want to set the focus in one of them , a CEdit, when an instance is created. The trouble is that I can get a pointer to the CEdit window, say p, but if I use the code p->SetFocus(); then a warning about a fatal error " memory that can't be read " is issued and application is killed. I've tried the code in the constructor and after creation; both producing the same effect. Any help ?
0
1564
by: srinivasarao yarru | last post by:
hi sir, in access 2003 how we can use the setfocuse property(we have to lostfocuse from one field with in that we have to setfocuse in same field) i am using this code but not setfocuse to same field :- Description about this code:- Sex field is one combo box in two options male-1;female-2 IND_APPL is one combo box here options are applicable-1;not applicable-0 CODE:-
3
3489
by: srinivasarao yarru | last post by:
hi in access 2003 how we can use the setfocuse property(we have to lostfocuse from one field with in that we have to setfocuse in same field) i am using this code but not setfocuse to same field (this is my problem please give proper gidence for this problem) :- Description about this code:- Sex field is one combo box in two options male-1;female-2 IND_APPL is one combo box here options are applicable-1;not applicable-0
5
3301
agroover
by: agroover | last post by:
I can't seem to figure out how to get rid of the errors. I recieve the following error when I leave the Grade.SetFocus in my code... Microsoft Access can't move the focus to the control Grade GRADE.SetFocus - Highlighted when I hit debug on the error message Private Sub C_Click()
8
17193
by: hawaiijeff | last post by:
I am writing an order receiving application in Access 2000. In this app you type in the tanker number the app looks that up in a table and should return just one row. The code below is showing how I am handling the errors of more than one row returned or no rows returned. After an error is handled I would like the focus to be returned to my tanker_txtbx so that the user can enter a new tanker number, but for some reason the application simply...
0
10171
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
11821
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11574
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
10908
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...
1
8462
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
7605
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
6416
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...
1
5155
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
4731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.