PC Review


Reply
Thread Tools Rate Thread

DB results comparison questions

 
 
Martin Stabrey
Guest
Posts: n/a
 
      26th Feb 2008
I'm slowly working my way through being able to display DB results from a
user-input form which has 5 fields. My problems are these:

3 of my 5 fields are simple text fields where a user can enter any part of
what they think they may need eg. they may enter "sm" if they are not sure
if a surname if "smith" or "smyth". The results would then display all
records containing "sm". I'm not sure which comparison to use - do I use
"contains" or "like". What's the difference?
The remaining 2 of 5 fields are drop down lists where the user selection is
pre-defined. I presume I would make the comparison "equal" in this case.

Now, my biggest issue - I would like records to be returned regardless of
how many fields are filled in(obviously assuming a minimum one one field is
chosen by the user). So - as an example, if all the text entry fields are
left blank, and only one drop down item is chosen, I would like all records
that match that selection to be returned. Similarly, if two text fields are
completed, I would like all records returned that match the entry in these
two fields. There of course can also be text fields filled and drop-down
lists selected.
I have tried using "or" from the "And/or" for all of the five fields
(assuming that this is the correct choice), but records that don't match are
also returned. What am I doing wrong? Could it have something to do with the
first option in the drop down lists being left blank (ie. <option></option>)
and this is being picked up somewhere?

Any help appreciated!

Tx.

Mart


 
Reply With Quote
 
 
 
 
Kathleen Anderson
Guest
Posts: n/a
 
      26th Feb 2008
Martin:
This should help with your first question: Description of the SQL syntax
that is generated by the FrontPage Database Results Wizard
http://support.microsoft.com/kb/306430 scroll down to the Text Field
Queries section.

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
Expression Web Resources: http://www.spiderwebwoman.com/xweb/
FrontPage Resources: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others


"Martin Stabrey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm slowly working my way through being able to display DB results from a
> user-input form which has 5 fields. My problems are these:
>
> 3 of my 5 fields are simple text fields where a user can enter any part of
> what they think they may need eg. they may enter "sm" if they are not sure
> if a surname if "smith" or "smyth". The results would then display all
> records containing "sm". I'm not sure which comparison to use - do I use
> "contains" or "like". What's the difference?
> The remaining 2 of 5 fields are drop down lists where the user selection
> is pre-defined. I presume I would make the comparison "equal" in this
> case.
>
> Now, my biggest issue - I would like records to be returned regardless of
> how many fields are filled in(obviously assuming a minimum one one field
> is chosen by the user). So - as an example, if all the text entry fields
> are left blank, and only one drop down item is chosen, I would like all
> records that match that selection to be returned. Similarly, if two text
> fields are completed, I would like all records returned that match the
> entry in these two fields. There of course can also be text fields filled
> and drop-down lists selected.
> I have tried using "or" from the "And/or" for all of the five fields
> (assuming that this is the correct choice), but records that don't match
> are also returned. What am I doing wrong? Could it have something to do
> with the first option in the drop down lists being left blank (ie.
> <option></option>) and this is being picked up somewhere?
>
> Any help appreciated!
>
> Tx.
>
> Mart
>



 
Reply With Quote
 
Martin Stabrey
Guest
Posts: n/a
 
      26th Feb 2008
Hey Kathleen. Thanks again. I got it sorted.

Mart

"Kathleen Anderson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Martin:
> This should help with your first question: Description of the SQL syntax
> that is generated by the FrontPage Database Results Wizard
> http://support.microsoft.com/kb/306430 scroll down to the Text Field
> Queries section.
>
> --
>
> ~ Kathleen Anderson
> Microsoft MVP - FrontPage
> Spider Web Woman Designs
> Expression Web Resources: http://www.spiderwebwoman.com/xweb/
> FrontPage Resources: http://www.spiderwebwoman.com/resources/
> Please reply to the newsgroup for the benefit of others
>
>
> "Martin Stabrey" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I'm slowly working my way through being able to display DB results from a
>> user-input form which has 5 fields. My problems are these:
>>
>> 3 of my 5 fields are simple text fields where a user can enter any part
>> of what they think they may need eg. they may enter "sm" if they are not
>> sure if a surname if "smith" or "smyth". The results would then display
>> all records containing "sm". I'm not sure which comparison to use - do I
>> use "contains" or "like". What's the difference?
>> The remaining 2 of 5 fields are drop down lists where the user selection
>> is pre-defined. I presume I would make the comparison "equal" in this
>> case.
>>
>> Now, my biggest issue - I would like records to be returned regardless of
>> how many fields are filled in(obviously assuming a minimum one one field
>> is chosen by the user). So - as an example, if all the text entry fields
>> are left blank, and only one drop down item is chosen, I would like all
>> records that match that selection to be returned. Similarly, if two text
>> fields are completed, I would like all records returned that match the
>> entry in these two fields. There of course can also be text fields filled
>> and drop-down lists selected.
>> I have tried using "or" from the "And/or" for all of the five fields
>> (assuming that this is the correct choice), but records that don't match
>> are also returned. What am I doing wrong? Could it have something to do
>> with the first option in the drop down lists being left blank (ie.
>> <option></option>) and this is being picked up somewhere?
>>
>> Any help appreciated!
>>
>> Tx.
>>
>> Mart
>>

>
>



 
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
Interesting results in speed comparison with C++ Daniel Earwicker Microsoft C# .NET 13 10th Sep 2007 01:14 PM
Comparison or Difference Results: NEW Charles Phillips Microsoft Access Queries 3 4th Aug 2006 03:45 PM
Results comparison with ad-aware Tom G Spyware Discussion 1 17th Jan 2005 09:09 PM
getting comparison results in multiple cells ayl322 Microsoft Excel Misc 3 6th Aug 2004 12:26 AM
Re: hi I want to add the results on comparison with 2 fields. navpoo Microsoft Excel Programming 0 10th Jul 2004 12:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:00 AM.