PC Review


Reply
Thread Tools Rate Thread

Database Search. 1 Search box, to search multiple db fields

 
 
=?Utf-8?B?Q2hyaXM=?=
Guest
Posts: n/a
 
      1st May 2007
Hi,
We have a search page that connects to our Access Database. What we would
like to have is a search field, where the user can enter criteria. We would
like when the users hits the submit button, that the search will look into
multiple fields of the database.

So for example if they enter XX into the search field and hit submit. It
will bring up any results where XX is in either Field 1 and/or Field 2

Is this possible within FP2003? When I use the wizard, it creates 2
seperate search fields on the page. 1 for each field in the db, and this is
confusing for the user because they might not know which one to search?

Hope it's possible
Thanks
Chris.
 
Reply With Quote
 
 
 
 
Jon Spivey
Guest
Posts: n/a
 
      1st May 2007
Hi Chris,

You'd want a custom query in the wizard.
select * from table where (field1 = '::FormField::') or (field2 =
'::FormField::')

Cheers,
Jon

"Chris" <(E-Mail Removed)> wrote in message
news:13B9113E-8489-4073-BA9E-(E-Mail Removed)...
> Hi,
> We have a search page that connects to our Access Database. What we
> would
> like to have is a search field, where the user can enter criteria. We
> would
> like when the users hits the submit button, that the search will look into
> multiple fields of the database.
>
> So for example if they enter XX into the search field and hit submit. It
> will bring up any results where XX is in either Field 1 and/or Field 2
>
> Is this possible within FP2003? When I use the wizard, it creates 2
> seperate search fields on the page. 1 for each field in the db, and this
> is
> confusing for the user because they might not know which one to search?
>
> Hope it's possible
> Thanks
> Chris.



 
Reply With Quote
 
=?Utf-8?B?Q2hyaXM=?=
Guest
Posts: n/a
 
      1st May 2007
Hi Thanks for the code,

I just tried it, and it doesn't seem to be working the way I expected.
If both fields have a 1 word entry, and the search criteria matches that
word, then it will appear.

But if either field has a sentence, then nothing appears. How do I make a
search more of a wildcard? I should put a % somewhere right?



"Jon Spivey" wrote:

> Hi Chris,
>
> You'd want a custom query in the wizard.
> select * from table where (field1 = '::FormField::') or (field2 =
> '::FormField::')
>
> Cheers,
> Jon
>
> "Chris" <(E-Mail Removed)> wrote in message
> news:13B9113E-8489-4073-BA9E-(E-Mail Removed)...
> > Hi,
> > We have a search page that connects to our Access Database. What we
> > would
> > like to have is a search field, where the user can enter criteria. We
> > would
> > like when the users hits the submit button, that the search will look into
> > multiple fields of the database.
> >
> > So for example if they enter XX into the search field and hit submit. It
> > will bring up any results where XX is in either Field 1 and/or Field 2
> >
> > Is this possible within FP2003? When I use the wizard, it creates 2
> > seperate search fields on the page. 1 for each field in the db, and this
> > is
> > confusing for the user because they might not know which one to search?
> >
> > Hope it's possible
> > Thanks
> > Chris.

>
>
>

 
Reply With Quote
 
Jon Spivey
Guest
Posts: n/a
 
      1st May 2007
In that case yes, try it like this
select * from table where (field1 like ':%:FormField::%') or (field2 like
'%::FormField::%')

Cheers,
Jon

"Chris" <(E-Mail Removed)> wrote in message
news19F853A-1FC4-43F2-9FB7-(E-Mail Removed)...
> Hi Thanks for the code,
>
> I just tried it, and it doesn't seem to be working the way I expected.
> If both fields have a 1 word entry, and the search criteria matches that
> word, then it will appear.
>
> But if either field has a sentence, then nothing appears. How do I make
> a
> search more of a wildcard? I should put a % somewhere right?
>
>
>
> "Jon Spivey" wrote:
>
>> Hi Chris,
>>
>> You'd want a custom query in the wizard.
>> select * from table where (field1 = '::FormField::') or (field2 =
>> '::FormField::')
>>
>> Cheers,
>> Jon
>>
>> "Chris" <(E-Mail Removed)> wrote in message
>> news:13B9113E-8489-4073-BA9E-(E-Mail Removed)...
>> > Hi,
>> > We have a search page that connects to our Access Database. What we
>> > would
>> > like to have is a search field, where the user can enter criteria. We
>> > would
>> > like when the users hits the submit button, that the search will look
>> > into
>> > multiple fields of the database.
>> >
>> > So for example if they enter XX into the search field and hit submit.
>> > It
>> > will bring up any results where XX is in either Field 1 and/or Field 2
>> >
>> > Is this possible within FP2003? When I use the wizard, it creates 2
>> > seperate search fields on the page. 1 for each field in the db, and
>> > this
>> > is
>> > confusing for the user because they might not know which one to search?
>> >
>> > Hope it's possible
>> > Thanks
>> > Chris.

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?Q2hyaXM=?=
Guest
Posts: n/a
 
      1st May 2007
Thank You!
I was close, I was putting my 'Like' in the wrong place!

Thanks again

"Jon Spivey" wrote:

> In that case yes, try it like this
> select * from table where (field1 like ':%:FormField::%') or (field2 like
> '%::FormField::%')
>
> Cheers,
> Jon
>
> "Chris" <(E-Mail Removed)> wrote in message
> news19F853A-1FC4-43F2-9FB7-(E-Mail Removed)...
> > Hi Thanks for the code,
> >
> > I just tried it, and it doesn't seem to be working the way I expected.
> > If both fields have a 1 word entry, and the search criteria matches that
> > word, then it will appear.
> >
> > But if either field has a sentence, then nothing appears. How do I make
> > a
> > search more of a wildcard? I should put a % somewhere right?
> >
> >
> >
> > "Jon Spivey" wrote:
> >
> >> Hi Chris,
> >>
> >> You'd want a custom query in the wizard.
> >> select * from table where (field1 = '::FormField::') or (field2 =
> >> '::FormField::')
> >>
> >> Cheers,
> >> Jon
> >>
> >> "Chris" <(E-Mail Removed)> wrote in message
> >> news:13B9113E-8489-4073-BA9E-(E-Mail Removed)...
> >> > Hi,
> >> > We have a search page that connects to our Access Database. What we
> >> > would
> >> > like to have is a search field, where the user can enter criteria. We
> >> > would
> >> > like when the users hits the submit button, that the search will look
> >> > into
> >> > multiple fields of the database.
> >> >
> >> > So for example if they enter XX into the search field and hit submit.
> >> > It
> >> > will bring up any results where XX is in either Field 1 and/or Field 2
> >> >
> >> > Is this possible within FP2003? When I use the wizard, it creates 2
> >> > seperate search fields on the page. 1 for each field in the db, and
> >> > this
> >> > is
> >> > confusing for the user because they might not know which one to search?
> >> >
> >> > Hope it's possible
> >> > Thanks
> >> > Chris.
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search string to search for wild terms in Access database gab1972 Microsoft Excel Programming 0 27th Jan 2010 05:37 PM
Can't do a search in Outlook 2007 (Instant search encountered aproblem while trying to display search results) Bradley Burton Microsoft Outlook Discussion 0 14th Apr 2008 01:41 PM
Search memo fields by entering multiple search terms in one search Sietske Microsoft Access VBA Modules 2 3rd Jan 2008 11:08 PM
How do I search multiple fields in a table using one search box? =?Utf-8?B?bW1hcmtz?= Microsoft Access VBA Modules 3 29th Jun 2006 06:35 PM
Multiple Criteria Search (5+ Search Fields) =?Utf-8?B?VE9NSA==?= Microsoft Access Database Table Design 3 30th May 2006 02:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:48 AM.