Newbie Help: Query Builder
I'm in a hurry so I'm sorry if I overlooked something obvious.
I haven't coded in Visual Basic for well over 5 years so I'm very rusty and I need to create a database frontend that allows a user to see a table in a .mdb and also search through the columns.
So I do the following:
1)New Project and add the mdb and table as a data source.
2)Drag the table into the form and use the query builder to create a search for the Title Column by adding (WHERE Title=?) or (WHERE Title like ?)
However when I use the search query, it'll only show results that match exactly whats in the search box. I need it to display similiar results as well.
eg: If I type in Harry Potter, I need it to show three different Harry Potter Titles. If I type in Tolkien I need it to show results for JRR Tolkien as well.
How do I set this up? It's probably something obvious but like I said I was in a hurry so I possibly overlooked it.
Re: Newbie Help: Query Builder
Hi Dag,
You can use wildcard characters.
For example:
%Potter% will match "Potter" anywhere in the title.
Read a lot more about them here:
http://office.microsoft.com/en-us/ac...881851033.aspx
Good luck
Re: Newbie Help: Query Builder
How would i go about making sure that the % sign is automatically added before and after the text to search for?
Re: Newbie Help: Query Builder
Something like this:
(WHERE Title Like '%' + ? + '%')
Re: Newbie Help: Query Builder
Oh man, thank you so so much! That worked perfectly.
Damn, i feel like an idiot for not trying that...but anyway, thanks. My project is finally done.
Re: Newbie Help: Query Builder