473,791 Members | 2,949 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.arti cleName) Like "*" &
Me!Combobox & "*")) ORDER BY article.article Name;

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.req uery
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 7647
Perhaps part of the problem is that your SQL has left out a pair of
single quotes.

SELECT article.* FROM article WHERE (((article.arti cleName) Like "'*"
&
Me!Combobox.Val ue & "*'")) ORDER BY article.article Name;

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

Also you should use Me.ComboxBox.Va lue
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.arti cleName) Like "*" &
Me!Combobox & "*")) ORDER BY article.article Name;

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.req uery
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
2528
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 work. I am keeping all the info in one table and using an Index numberas my Primary Key. I have a form based on this table with a Findrecord button (used the Command Button Wizard for this) that populates the form when it finds the particular record....
8
12107
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 combobox. What is the solution? Thank you in advance.
7
23530
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 for a match between cVal and the selectedValue then stop when I do have a match the obvious problem is that each iteration fires the selectedIndexChanged but also for a large list this will slow everything down. There must be a better way int...
3
2238
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. Thanks, /*Raj*/
5
10296
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 trying to do is make an autoscroll combobox. like you have on html textbox's, but this time you hit enter for a change to be made. i do this because i dont want to requery every time a single letter is inputed. it would be too slow. so i make them hit...
5
5916
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 CompanyID's. The second combobox will contain unique memberID's. Each of the tables that I have to search contain a CompanyID and a memberID field, and these fields are not unique in the respective tables. Like CompanyID, MemberID
4
1818
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, configured, dragged an Dataadapter per each table I need it, then generated the dataset, after that, I stablished the relations between tables, then, went over to the datasources, choose the parent datasource and clicked on the + sign, it...
6
5289
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
14340
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 selects. Any ideas why? ComboBox Window import search def match(): #Initialize new2 = tk.Toplevel() new2.title("Matching Students and Projects") title = tk.Label(new2, text = "See Student/Project matches for:", font=("Arial",...
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9993
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4109
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.