Any simple way to make Ctrl + F work in a combobox?

G

Guest

After the user enters data in the search field, the search is being conducted
in the bound column, which is a nonsensical ID number. Can I alter this
process simply and search one of the unbound columns instead?

The combo's source is a select statement running in a lookup table, two
columns, the ID field, and a name field. The field on the main form/table is
storing the bound column data.
 
G

Guest

If the bound column is hidden then the search should be carried out on the
value of the visible column. If the bound column is not hidden then set the
control's ColumnWidths property to something like 0cm;8cm or rough equivalent
in inches; the important thing is that the first dimension is zero. This
assumes the bound column is the first one by virtue of the control's
BoundColumn property being 1 and its RowSource property something like:

SELECT ContactID, ContactName
FROM Contacts
ORDER BY ContactName;

You should then see only the names in the drop down list and when a
selection is made the name will show in the control. The unseen ID number
will still be the value of the control, however, but a Find will be on the
names.

Ken Sheridan
Stafford, England
 
G

Guest

Ken,
The bound column is hidden by virtue of being set at 0" width. The second
column, Name, is visible. But I'm not talking about auto-complete type
searching. I'm talking about Ctrl + F, the Find function, where you get the
popup window you can do a find (and replace) in the field. The Find is
presently only searching in the bound column, which is a meaningless (to the
user) ID autonumber. The name field (column 2) is visible and that's what I
want to search when I enter Ctrl + F or click the binocular button...
 
G

Guest

I'm talking about the Find mechanism too. I think you'll find that the
'Search Fields as Formatted' check box in the Find and Replace dialogue is
unchecked. Checking it should cure the problem and conduct the search on the
visible column.

Ken Sheridan
Stafford, England
 
G

Guest

That was it, thanks Ken!



Ken Sheridan said:
I'm talking about the Find mechanism too. I think you'll find that the
'Search Fields as Formatted' check box in the Find and Replace dialogue is
unchecked. Checking it should cure the problem and conduct the search on the
visible column.

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top