473,383 Members | 1,733 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,383 software developers and data experts.

Finding Calling Control

Hi All,

I have a problem.

I have multiple text boxes on one form. When the user clicks in any of these
text boxes, another (search) form opens which queries a database and returns
the search results to the textbox.

Now as I said I have multiple shared textboxes on the first form. I need to
know a why I can pass to my search form which textbox in perticular called
the search window.

Does anyone know of a way to achieve this?

I am using VB.Net 2003.

Many Thanks

Nov 23 '05 #1
2 983

"Materialised" <ma**********@privacy.net> wrote in message
news:3u*************@individual.net...
Hi All,

I have a problem.

I have multiple text boxes on one form. When the user clicks in any of
these text boxes, another (search) form opens which queries a database and
returns the search results to the textbox.

Now as I said I have multiple shared textboxes on the first form. I need
to know a why I can pass to my search form which textbox in perticular
called the search window.

Does anyone know of a way to achieve this?

I am using VB.Net 2003.

Many Thanks


Sorry I also did mean to mention I know I can do this using a public
variable. But I am looking for a better way.

Thanks
Nov 23 '05 #2
I assume you're launching the search form from one of the textbox events. If
that is the case, the event should have a "sender" parameter that could be
passed to the search form if you need the textbox in that form. You could
have a public property in the search form and a private variable that holds a
reference to your textbox.

If you're querying a database and returning the results to the textbox, you
probably don't even need to pass the textbox to the search form unless you
use the textbox for some other reason in the search form. All you should have
to do is show the search form using the ShowDialog method and then use the
results returned from your query after you return from showing the search
form. The search form would then need to have a public property to pass back
the query results.

Hope this helps.

"Materialised" wrote:

"Materialised" <ma**********@privacy.net> wrote in message
news:3u*************@individual.net...
Hi All,

I have a problem.

I have multiple text boxes on one form. When the user clicks in any of
these text boxes, another (search) form opens which queries a database and
returns the search results to the textbox.

Now as I said I have multiple shared textboxes on the first form. I need
to know a why I can pass to my search form which textbox in perticular
called the search window.

Does anyone know of a way to achieve this?

I am using VB.Net 2003.

Many Thanks


Sorry I also did mean to mention I know I can do this using a public
variable. But I am looking for a better way.

Thanks

Nov 23 '05 #3

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

Similar topics

3
by: Dave | last post by:
guys say if I include("anyfile.php") into a file. Is it possible for me to access the calling page from anyfile.php. Can I do something like this for instance:: if callingpage ==...
1
by: Chris | last post by:
I have several read only datasheet subforms for which I would like to incorporate a feature similar to the auto expand of a combo box i.e. user presses a series of keys and and the record pointer...
10
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
5
by: Tosch | last post by:
Is there a way to find out which events are attached to a control (say 'validating' event for a textbox) and call the event? Tosch
2
by: Alex Maghen | last post by:
I want to create a utility function that will seach the current page for one of my UserControls by it's type. So, let's say that I have a UserControl whose class I defined as follows: namespace...
2
by: sumanthsclsdc | last post by:
Hello friends, I have a problem, I implemented a class which uses tkinter and displays the window as required, the class will create a window with listbox and inserts some items into it, I...
7
by: Brad Baker | last post by:
I am trying to programmatically set a placeholder control in csharp which is nested inside a repeater control between <ItemTemplateand </ItemTemplate> tags, however I am running into problems. I've...
1
by: hrubesh | last post by:
Hi, I am having a problem finding the right location of a control if it is found on a form that is on an MDI parent. On mouse click, i want to bring out a "pop up window" that will display extra...
1
by: Mufasa | last post by:
I have a page that has a master page. I'm writing generic code to find multiple controls on the page (I have a number of controls called tbName1, tbName2, tbName3, ..., tbName20) and rather than...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.