473,516 Members | 3,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Loosing items in combo after form looses focus

Hi Everyone,
I have an issue thats bugging me some. I have a search form that I created
to search for clients in the database from the Client form. User selects the
client from a list and the focus is sent back to the Client form. In the
client form I have a combo filled with Client objects. THe problem is that
the search form calls a the following function:
Public Sub LoadPatient(ByRef lPatientId As String)
Dim s As Integer
s = me.cmbPatient.FindString(lPatientId)
cmbPatient.SelectedIndex = s
cmbPatient_SelectedIndexChanged(cmbPatient, New System.EventArgs())
End Sub
But when the function is called, the Patient Combo don't seem to have any
items in them. So s is always set to -1. At least while in this function
which is confusing because before the search dialog was called the list had
over 400 records. And sometime after it exits this function and the patient
form has the focus again everything seems fine. Whats up with that. Thanks
for any suggestions.
Michael

May 1 '07 #1
0 1042

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

Similar topics

3
1618
by: MarsVoyager | last post by:
Hi, I want to change the value of a submit button when the onChange event is fired by a Radio Input. Problem is, it seems the value is modified in the gui only when the Radio Input looses focus, not when its value is changed by the user. How can I make the value on the submit button change immediately upon action on the radio input and...
1
1663
by: Paul Tsai | last post by:
Dear All, I used csharp web form to develop my company web application, and my question is how shuld I do if I want to focus on my textbox(ex. like Java Script form.txtID.focus()). Thanks !! Sincerely yous, Paul
2
1684
by: Vasilis X | last post by:
Hello. I am using vb.net. On a form i have a picture box and i draw points, lines, arcs etc in it. When i minimize the form and then maximize it again or if the form looses the focus for any reason all graphics are gone and i have to redraw them. Is there a way to make my application to display the graphics all the time?
3
2338
by: Chris | last post by:
I have a form that calls ShowDialog on a number of different forms at different times. I want to be able to know anytime the form loses focus. But Form.Focused isn't ever true once a control has focus and Form.Leave does not fire when showdialog is called on another form. Anyone have any idea how to capture the form losing focus? Chris
1
1643
by: Tedmond | last post by:
Dear all, How to prevent a datagrid in Windows form getting focus? Even user click on it. I use barcode scanner as input and display the result in a datagrid. My problem is when the datagrid got focus, the scanner input will be discarded. I cannot find any event to handle the input. Thanks,
1
4159
by: Manikandan | last post by:
Hi, I have a form with progress bar. I'm querying sql server with large number of records(around 1 lakh) for export The records are written to a text file I'm showing the process running by updating the progress bar If the form loses focus(i.e selecting any other application) means progress bar is not updating The coding is below
3
2654
by: =?Utf-8?B?SmVzc2U=?= | last post by:
I have searched and searched, with no luck. I have a Form that has several event listeners in it (Keypresses, speech recognition, afew others). When I click a component in the form (such as a button), the form itself loses focus. How can I get it back? I have tried this.Focus() from w/in the form in a timer with no luck as well as...
1
1308
by: dotnutshell | last post by:
I need to work out wether my windows form has focus of the mouse and keyboard. My project is the following: 2 or more applications. 1 application is a controller talking to some hardware The client application are connected using a named pipe or .NET remoting. When an event occurs on the hardware, the controlling process also sends the...
0
7273
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7574
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7547
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...
0
5712
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5106
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...
0
4769
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...
0
3265
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...
1
823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.