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

Combobox Search with LIKE

Hello Alltogether, following problem is bugging me :)

I am havin a Combobox where i can browse and select my articles. So far so
good!

Over the time my table "article" growed and now it is not very conveniant to
search for articles, the name you dont know exactly

Now i would like to realise the same Combobox with a Select statement over
the same table "article" as follows:
SELECT article.* FROM article WHERE (((article.articleName) Like "*" &
Me!Combobox & "*")) ORDER BY article.articleName;

As you can see, this sql statement looks for the entered string in the
column articleName and if it is part of any article. (if i enter "er" it
will show up "hamster" as well as "ernie" and "bertie") :)

Trying to actualize the table "after actualisation" with Me!Combobox.requery
is not working :/

I am turning myself round and round! But maybe one of you could stop ;) ....
thank and if you need further information about my problem, please let me
know!
Mar 27 '07 #1
1 7610
Perhaps part of the problem is that your SQL has left out a pair of
single quotes.

SELECT article.* FROM article WHERE (((article.articleName) Like "'*"
&
Me!Combobox.Value & "*'")) ORDER BY article.articleName;

Not you had LIKE " * " & Me!Combobox & " * "
I have LIKE " ' * " & Me!Combobox & " * ' "

Also you should use Me.ComboxBox.Value
On Mar 27, 11:23 am, "Pascal Hagedorn" <dasgehtdichni...@web.de>
wrote:
Hello Alltogether, following problem is bugging me :)

I am havin a Combobox where i can browse and select my articles. So far so
good!

Over the time my table "article" growed and now it is not very conveniant to
search for articles, the name you dont know exactly

Now i would like to realise the same Combobox with a Select statement over
the same table "article" as follows:
SELECT article.* FROM article WHERE (((article.articleName) Like "*" &
Me!Combobox & "*")) ORDER BY article.articleName;

As you can see, this sql statement looks for the entered string in the
column articleName and if it is part of any article. (if i enter "er" it
will show up "hamster" as well as "ernie" and "bertie") :)

Trying to actualize the table "after actualisation" with Me!Combobox.requery
is not working :/

I am turning myself round and round! But maybe one of you could stop ;) ....
thank and if you need further information about my problem, please let me
know!

Mar 27 '07 #2

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

Similar topics

3
by: Sarah Smith via AccessMonster.com | last post by:
I am creating a database of documents that need to be worked on, are int eh proress of being worked on, and have been completed. Sometimes the same document (an updated version) comes back for more...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
7
by: NCrum | last post by:
I want to set the Default value of a Combobox for any changeable record and have got this working but it is totaly unsatisfactory see the code below I loop through the items in the Combo looking...
3
by: RajW | last post by:
Is it possible to have an auto complete ComboBox in ASP.NET? I would like to create a ComboBox that functions similarly to the way that IE will try to autocomplete a URL as you type it in. ...
5
by: Gil | last post by:
Is there a way to tell if a combbox is in dropdown mode. I tried and if statement combobox.dropdown = true but i get an error. dropwndown function doesnt store if its true or false what i am...
5
by: Rich | last post by:
Hello, I have a search application to search data in tables in a database (3 sql server tables). I populate 2 comboboxes with with data from each table. One combobox will contain unique...
4
by: JJGarcia | last post by:
Hi Everyone, I'll try to explain the process I'm following, I'm new to this so I'm triying the easy way first, probably the lasyest too! I created a new Project, drag in to it a SQLConnection,...
6
by: =?Utf-8?B?U2NvdHQgTGFt?= | last post by:
Hi, Is there any way to access the values (not display names)of a combobox ? For example: combo1.DataSource = dataset1.tables(0) combo1.DisplayMember = "Name" combo1.ValueMember = "ID"
1
by: SnakesRule | last post by:
I'm trying to pass a name from a ComboBox to a MySQL search function, but no matter how I twist it, the get() always returns the first value in the combobox list, regardless of which name the user...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.