Report Difficulty

blackbeltrrf

Registered User.
Local time
Yesterday, 22:55
Joined
May 10, 2007
Messages
13
I have a simple database that has in the same record in a table 3 fields of last names that are populated by entering the data in a form. There could be the same last names in each of the 3 fields. (ie; John Doe, Mary Doe, Little Doe) My problem is that I want to make a report by clicking on a button searching by the last name (Doe) and consider each of the 3 last names in my search criteria. Does anyone know how this can be accomplished as not to miss any of the (Doe's in this case)? Please help if you can I know it sounds confusing.

Thanks in advance for any help!
 
Thank you for replying Wayne I really appreciate it but my problem is a little deeper than that, let me explain.

Table Example:

FirstNam1 Lastnam1 FirstNam2 Lastnam2 Firstnam3 Lastnam3

1 John Doe Mary Doe JAck Smith
2 Rob johnson Greg Doe any name any name


From my form I need to click on a command button that prompts for a name. Say I enter "Doe".

I need the output query to return both records 1 and 2 because there is a Doe in both records but they are not in the same fields. If I can get a query to return 2 records then I can get them into the report.

I hope this is not too confusing but the criteria is not static as you can see but dynamic to what I enter in an input box or something like that and then look in each of the 3 fields for that input and return a record for each that it finds.

Thank you or anyone else who can help me figure this out
 
BB,

This task is made a little bit harder because of your table structure.
Use the Search Facility here and look for "normalize" or "normalise".

Currently, assume that the user enters "Doe" in a textbox (txtSearch)
on your form (frmMain).

Your query can have multiple criteria for the LastName fields:

Code:
Field:		LastName1					LastName2					LastName3

Criteria:	Like "*" & Forms!frmMain![txtSearch] & "*"
Or:								Like "*" & Forms!frmMain![txtSearch] & "*"
Or:														Like "*" & Forms!frmMain![txtSearch] & "*"

Hard to show it like that, but the main point is to "stagger" the Criteria
giving an "Or" expression.

hth,
Wayne
 
Wayne,

THANK YOU THANK YOU!! That works Great! Wish I could buy you a drink for the fast response! BTW I have looked at the Normalize threads and when I get a chance I will do it but I needed this as a Quick thing.


TY Again!
 

Users who are viewing this thread

Back
Top Bottom