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

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 1031

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

Similar topics

3
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,...
1
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 !!...
2
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...
3
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...
1
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...
1
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...
3
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...
1
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...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.