Topics Search

combo box, search by second column but select value of first

combo box, search by second column but select value of first
Views: 112
I have a combo box that offers about 100 rows from which a user must choose a value. Two columns are displayed - ID, Friendly_name. The combo box is bound to the ID (1st) column. To make it easier for users I wanted them to be able to type the friendly name and have the combo box scroll to the nearest match, like an autocomplete field.

However, when a row is selected from the combo box results the ID value is captured.
Sponsored Links:

More topics

 

Select an item from a multi column combo box programmatically

Preview
I try to select a value from a multi column combo box programmatically. When you do that with VB6 you just set the listindex property to the desired row (minus 1). The fact is that in access you can't do that because this property is read only. I googled on that and I found that you can set the combo box to Me.Combo = Me.combo.column(1, DesiredIndex). This does the trick but I believe it just sets the text property of the combo box and doesn't select the row.

How can I select the entire row so that I can use the Column(0,Combo.listindex) value?
 

Combo box wont accept input

Preview
I have created a search form with a combo box to let users find a specific name, this works OK (Click the arrow and names appear in the list, great) but, when a name is chosen the combo box remains blank and an error beep is heard (I believe the beep is just a default sound when something isnt right)

Combo Box settings;
Control Source - CliID
Row Source - SELECT Clients.CliID, [CliFirstName] & " " & [CliLastName] FROM Clients;
Column Count - 2
Bound Column - 1
Column Widths - 0,2.45
 

Filter by combo box & text box?

Preview
If you select forms and then click "frmResults". The click the search button. When I select Name from the combo box and enter a name it will return any record with that name. My problem is with the telephone number. I need to be able to select "Telephone" from the combo box and enter a telephone number into the text box. When I select search the query should search all 3 telephone fields in the master table. (Daytime, Evening and mobile) I think I need a LIKE or statement but cant get it working
 

Using a lookup column as row source

Preview
I'm trying to set up a combo box that will search my records and I've gotten it to work, however I'm trying to fix the values it displays.

The row source for the combo box is

SELECT [Match].[MatchID], [Match].[Home], [Match].[Away] FROM [Match];
, with the fields Home and Away being lookup fields themselves, with rowsources
SELECT [Team].[TeamID], [Team].[TeamName] FROM Team;

So the search combo box displays MatchID, Home and Away fine, but it shows the TeamID column of Home and Away, and I would like it to show the TeamName column. Is there a way to use the column function (I.e. Column(#)) in the row source?
 

combo box query search

Preview
I'm trying to create a form which has 2 combo boxes. The second combo box depends on what happens on the first e.g. food on the first on then the food names will show up on the second

I've managed to get this working but I would like to add a search button so it will check the first combo box and go to that field title in the database then the second combo box will determine the results e.g.

If I chose food in the first combo box then chose pizza in the second one it would go to the food column and only show pizza within it
 

Select field you want to search, select value, then Search

Preview
The goal of my project is to create 2 combo boxes and one "button" that enables the user to search my database.

The first combo box (called FieldCBO) lists the field names: Eg. "Last Name, First Name, Address" fields from the "CONTACTS" table.

The second combo box (called ValueCBO) is bounded to the first combo box so that if you select the "Last Name" field, everyone's last name will show up (e.g. Smith, Doe, etc), if you select the "First Name" field, everyone's first names will show up (e.g. John, Jane, etc).

Unfortunately, I can't get this second combo box. I believe something is wrong with my "Row Source: SELECT Forms![Search Form]!FieldCBO FROM CONTACTS" because an error message stating "The Access database engine does not recognize 'Forms![Search Form]!FieldCBO' as a valid field name or expression

What should I put in place of "Forms![Search Form]!FieldCBO
 

sum combo box based on other combo box

Preview
I have two combo box which are Customer Number and Period Posting Date coming from the same table,
what I'm after is after combo box which will give me value for each Customer in a specific posting Date month

for example

if some select Customer Number 0001 in combo box 1
and then select 2009/07 in Combo box 2
I want combo 3 or a text box to sum the values in thee amount column and display the total in combo 3 or they text box
 

Using Combo box in search form

Preview
So I've managed to use a search form that was posted on here but I am having a problem being able to search based on the displayed results of a combo box. I am trying to have a field search the second column of the combo box but I don't know the code to do so. To simplify the question here, is there a way I can use the search function that I built to find only the results based in column two (the displayed field on the search form) here is the code I am currently using:

'Item Search.
If Not IsNull(Me.cboItem) Then
strWhere = strWhere & "([Transaction Item] Like ""*" & Me.cboItem & "*"") AND "
End If

Right now all it lets me do is search but the first column the primary key Inventory.ID and not what I need Inventory.Item
 

Combo Box help

Preview
I have a combo box that gets its values from the second column in a two column table, with the first column being numbers and the second being words. I just made the width of the display of the first column 0 so it wouldn't show up in the combo box. Whenever I select a word from the combo box, the number from the table shows up in the spreadsheet that the form is attached to. How to I make the spreadsheet display the word (ie how do I make it display the values in the second column instead of the first).
 

Enter search text into Combo Box and return results from Query into same Combo Box

Preview
I want to have an "instant search" in a form that I have. I have a working model of this that is the setup shown on this <a href=""http://www.access-programmers.co.uk/forums/showthread.php?t=188663"">site</a>

The problem is that I want to make it better, what that means is that I want to be able to enter my search text into my combo box and have it run my query on change and produce my results in the combo box dropdown. I am not tied to this idea but I would like to see if its possible.

My table contains two columns that I want values from in my results.

Table Name = Controls
Column 1 = Field_Name
Column 2 = Template_Name

qryControls =
SELECT Controls.Template_Name, Controls.Field_Name
FROM Controls
WHERE (((Controls.Field_Name) Like "*" & [Forms]![Dummy Form]![txtSearch] & "*"))
ORDER BY Controls.Field_Name;

Is there any way to do this? I have tried countless efforts and cannot get it to work properly