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

Checking if focus is in the parent or child form.

Is there a vb command that can tell me if I have focus in the child or
parent form?

Basicly I have a search macro that needs me to have focus to any field
in the parent form. If my focus is set on any field in the parent form
it will search that field. However if I have focus set to a field in
the child form it fails. What I want to do is set focus to field1 of
the parent table but ONLY if focus is on a field in the child form. Is
there any way for me to tell where the foucs is?

Nov 13 '05 #1
1 3349
td*******@yahoo.com wrote:
Is there a vb command that can tell me if I have focus in the child or
parent form?

Basicly I have a search macro that needs me to have focus to any field
in the parent form. If my focus is set on any field in the parent form
it will search that field. However if I have focus set to a field in
the child form it fails. What I want to do is set focus to field1 of
the parent table but ONLY if focus is on a field in the child form. Is
there any way for me to tell where the foucs is?


If there is only two forms - a parent-child relationship - then you can
check the Me.Parent.Name and see if you get a valid value.

You only would from within code in the child form.

It gets more complicated if you have a tertiary type form (grandparent -
parent - child).

--
'---------------
'John Mishefske
'---------------
Nov 13 '05 #2

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

Similar topics

9
by: Randell D. | last post by:
Folks, I'm working on a contact name/address database whereby a slimed down list is shown in the main window. When a record is selected, the complete record is displayed in a new window via a...
2
by: Robert Nurse | last post by:
Hi All, I've got a strange problem in IE that I wonder if anyone has seen before. Basically, I've got a two window scenario. The parent window opens the child via window.open(). The child...
0
by: Chris | last post by:
Hi, I have a dilemma. I have a web form that, when submitted, does a window.open js function to submit the form data to a new aspx page which then shows a report. I wanted to make sure that...
0
by: nomenklatura | last post by:
Hi, I have a main menu which parent mdi form and i opening two mdi child form (frm1,frm2) with listview doubleclick event on main menu.. ex: Dim frm As New frm1 frm.MdiParent = Me ...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
5
by: RSH | last post by:
I am using code to create a new modal form from a parent form. It is not an MDI form. I need to know if an instance of the form already exists so when the user clicks on the button I can close...
5
by: Finn Stampe Mikkelsen | last post by:
Hi How can i set a focus to a textbox in my codebehind page?? I have this WebForm, that takes information from a user and 2 buttons on the form. One that takes action on the entered...
3
by: jan.loucka | last post by:
Hi, I looked around for this specific problem but could not find any answer - there's few things in VB but still nothing exactly like this so I'd appreciate any help. We're writing C# WinForm...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.