PC Review


Reply
Thread Tools Rate Thread

Searching for a record using two fields based on full/partial info

 
 
Rob M
Guest
Posts: n/a
 
      12th Feb 2009
Hi all,

I'm trying to set up a procedure that seems like it should be simple - but I
can't figure it out.

I have a table called demographics with separate columns for last name,
first name, birth date, address, etc. I have a search form with two text
boxes. I'm trying to create search capabilities based on last name and/or
first name, either with full or partial entries, using two text boxes. For
example, using the search form, I'd like to access John Smith's record
(displayed in a separate "Main" form) by typing in...

Textbox1 Textbox2
Smith John
Smith
Sm John
Smi Jo

....etc.

Does anyone have any suggestions on how to perform this? Or are there any
downloadable code excerpts available? I'm a noob muddling my way through
this...I would be grateful for any help.

Thank you,
Rob


 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      12th Feb 2009
On Thu, 12 Feb 2009 00:25:15 GMT, "Rob M" <(E-Mail Removed)> wrote:

>Hi all,
>
>I'm trying to set up a procedure that seems like it should be simple - but I
>can't figure it out.
>
>I have a table called demographics with separate columns for last name,
>first name, birth date, address, etc. I have a search form with two text
>boxes. I'm trying to create search capabilities based on last name and/or
>first name, either with full or partial entries, using two text boxes. For
>example, using the search form, I'd like to access John Smith's record
>(displayed in a separate "Main" form) by typing in...
>
>Textbox1 Textbox2
>Smith John
>Smith
>Sm John
>Smi Jo
>
>...etc.
>
>Does anyone have any suggestions on how to perform this? Or are there any
>downloadable code excerpts available? I'm a noob muddling my way through
>this...I would be grateful for any help.
>
>Thank you,
>Rob
>


Put a criterion on LastName of

LIKE [Forms]![Searchform]![Textbox1] & "*"

and on FirstName

LIKE [Forms]![Searchform]![Textbox2] & "*"
--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
 
Rob M
Guest
Posts: n/a
 
      12th Feb 2009
Hi John,

Many thanks, this is what I needed!

Cheers,
Rob


"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
news:(E-Mail Removed)...
> On Thu, 12 Feb 2009 00:25:15 GMT, "Rob M" <(E-Mail Removed)> wrote:
>
>>Hi all,
>>
>>I'm trying to set up a procedure that seems like it should be simple - but
>>I
>>can't figure it out.
>>
>>I have a table called demographics with separate columns for last name,
>>first name, birth date, address, etc. I have a search form with two text
>>boxes. I'm trying to create search capabilities based on last name and/or
>>first name, either with full or partial entries, using two text boxes.
>>For
>>example, using the search form, I'd like to access John Smith's record
>>(displayed in a separate "Main" form) by typing in...
>>
>>Textbox1 Textbox2
>>Smith John
>>Smith
>>Sm John
>>Smi Jo
>>
>>...etc.
>>
>>Does anyone have any suggestions on how to perform this? Or are there any
>>downloadable code excerpts available? I'm a noob muddling my way through
>>this...I would be grateful for any help.
>>
>>Thank you,
>>Rob
>>

>
> Put a criterion on LastName of
>
> LIKE [Forms]![Searchform]![Textbox1] & "*"
>
> and on FirstName
>
> LIKE [Forms]![Searchform]![Textbox2] & "*"
> --
>
> John W. Vinson [MVP]



 
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
Re: Searching, matching then searching another list based on the match T. Valko Microsoft Excel Misc 0 13th Dec 2006 06:08 AM
Merging two tables in Dataset? I only want to get the matching info based on the two key fields mike11d11 Microsoft VB .NET 8 9th Dec 2006 03:23 AM
Using two fields from a combo box in two different fields =?Utf-8?B?U2lsdmlv?= Microsoft Access Forms 2 1st Nov 2006 05:19 PM
Using two fields from a combo box in two different fields =?Utf-8?B?c3VwZXJfd2lmZV9tb20=?= Microsoft Access Forms 5 3rd Jul 2006 03:27 PM
autocalculating DB fields based on info from other fields =?Utf-8?B?REFOTU9Q?= Microsoft Access Forms 1 24th Feb 2005 04:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:51 AM.