Can anybody help me with adding the records of access to combo and then searching through that by typing in the combo
typing in the combo
I take it you mean searching through list that was loaded into the Combo Box.
You just have to extract the value from the current text in the combo, determine the size of the list in the combo, and then do a search using a loop until you find the value that matches.
Once you've found a match, you can stop at that point and determine the index at that value.
But you have to raise some type of event to determine when to perform the search. A command button would probably be the easiest:
Private sub Command1_Click() ' 1. Extract your typed text ' 2. Loop through the combo list to find the matching value and establish index values, etc. ' 3. Code to do whatever you want with that information. End Sub
Sir, i wanted to search in vb. and the entries are there in the combo and we want that as we enter the letters. The matching results are sorted out of the rest. For example if we right mu in combo then muslim, musa are left in the combo.
The matching results are sorted out of the rest.
I take it you mean you want to remove the list entries that don't match what you've typed in?
Your first step might be to save the complete list in some sort of array.
Option Explicit Dim strPeople() As String Dim intListCount As Integer Private Sub Form_Load() Dim IntCounter As Integer intListCount = List1.ListCount ReDim strPeople(intListCount - 1) ' For IntCounter = 0 To (intListCount - 1) strPeople(IntCounter) = List1.List(IntCounter) Next ' End Sub
Use this a master list to fill the combo box as you type. I wouldn't suggest filling the combo box to start with, but build your list first using your values from Access.
Use the KeyPress Event in the Combo Box to use with string search functions to fill your list as the user types.
But in essence each time he types, put code in the KeyPress Event to build the list for the combo box.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.
This is the result of previous question answered :
code for the listbox - datagridview interaction
At the top of the code ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...