Filters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In one of my tables I have a field that contains text as follows- “Candlewood
Hotelâ€. In the same field in the next entry it may contain AWA Flight. Is
it possible to do a filter on just one of the words in the field i.e.
Hotel? Then only display all entries with the word that was filtered?
 
In one of my tables I have a field that contains text as follows- ´Candlewood
Hotel¡. In the same field in the next entry it may contain AWA Flight. Is
it possible to do a filter on just one of the words in the field i.e.
Hotel? Then only display all entries with the word that was filtered?

In a query you would use as criteria on that field:

Like "*" & [What word?] & "*"
 
fredg said:
In one of my tables I have a field that contains text as follows- “Candlewood
Hotelâ€. In the same field in the next entry it may contain AWA Flight. Is
it possible to do a filter on just one of the words in the field i.e.
Hotel? Then only display all entries with the word that was filtered?

In a query you would use as criteria on that field:

Like "*" & [What word?] & "*"
OK that worked Thanks for the help. OK now that I have the info I want for
the report how would I filter out the word hotel and flight ect. in the
report?

Todd
 
fredg said:
In one of my tables I have a field that contains text as follows- ´Candlewood
Hotel¡. In the same field in the next entry it may contain AWA Flight. Is
it possible to do a filter on just one of the words in the field i.e.
Hotel? Then only display all entries with the word that was filtered?

In a query you would use as criteria on that field:

Like "*" & [What word?] & "*"
OK that worked Thanks for the help. OK now that I have the info I want for
the report how would I filter out the word hotel and flight ect. in the
report?

Todd

What does 'filter out' mean?
You want to return all records except those that include Hotel or
flight ect.?

As query criteria, write:

Not Like "*" & [What word?] & "*"
 
Fred,
I’m not in charge of a database that someone else has created. I’m not sure
why it was created this way but the field we are working with has the Name of
the hotel the person was in and also the word Hotel, ie..â€Holiday Inn
Hotelâ€. In that same filed there is also Flight information, ie. “SWA
Flightâ€. They powers above would like to know how much money was spent at
each hotel we have stayed at. I’ve created a report (with the help of you)
to pull out just the hotel information. Now I need to filter out the word
“Hotel†so just the name of the hotel appears on the report.


fredg said:
fredg said:
On Mon, 16 Jan 2006 14:47:02 -0800, Todd wrote:

In one of my tables I have a field that contains text as follows- “Candlewood
Hotelâ€. In the same field in the next entry it may contain AWA Flight. Is
it possible to do a filter on just one of the words in the field i.e.
Hotel? Then only display all entries with the word that was filtered?

In a query you would use as criteria on that field:

Like "*" & [What word?] & "*"
OK that worked Thanks for the help. OK now that I have the info I want for
the report how would I filter out the word hotel and flight ect. in the
report?

Todd

What does 'filter out' mean?
You want to return all records except those that include Hotel or
flight ect.?

As query criteria, write:

Not Like "*" & [What word?] & "*"
 
Fred,
Iÿm not in charge of a database that someone else has created. Iÿm not sure
why it was created this way but the field we are working with has the Name of
the hotel the person was in and also the word Hotel, ie..¡Holiday Inn
Hotel¡. In that same filed there is also Flight information, ie. ´SWA
Flight¡. They powers above would like to know how much money was spent at
each hotel we have stayed at. Iÿve created a report (with the help of you)
to pull out just the hotel information. Now I need to filter out the word
´Hotel¡ so just the name of the hotel appears on the report.

fredg said:
:

On Mon, 16 Jan 2006 14:47:02 -0800, Todd wrote:

In one of my tables I have a field that contains text as follows- ´Candlewood
Hotel¡. In the same field in the next entry it may contain AWA Flight. Is
it possible to do a filter on just one of the words in the field i.e.
Hotel? Then only display all entries with the word that was filtered?

In a query you would use as criteria on that field:

Like "*" & [What word?] & "*"
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

OK that worked Thanks for the help. OK now that I have the info I want for
the report how would I filter out the word hotel and flight ect. in the
report?

Todd

What does 'filter out' mean?
You want to return all records except those that include Hotel or
flight ect.?

As query criteria, write:

Not Like "*" & [What word?] & "*"

Using your example ....
In your report, add an Unbound text control.
Set it's Control Source to:
=IIf(InStr([YourField],"Hotel")>0,Left([RourField],InStr([YourField],"Hotel")-1),[[YourField])

If the field contains for example "Holiday Inn Hotel" or "Hilton
Hotel" only "Holiday Inn" or "Hilton" will display. If the field does
not include the word Hotel then the entire field will display.

What do you want to happen of the hotel name is "Hotel Astoria"?
 
fredg said:
Fred,
I’m not in charge of a database that someone else has created. I’m not sure
why it was created this way but the field we are working with has the Name of
the hotel the person was in and also the word Hotel, ie..â€Holiday Inn
Hotelâ€. In that same filed there is also Flight information, ie. “SWA
Flightâ€. They powers above would like to know how much money was spent at
each hotel we have stayed at. I’ve created a report (with the help of you)
to pull out just the hotel information. Now I need to filter out the word
“Hotel†so just the name of the hotel appears on the report.

fredg said:
On Tue, 17 Jan 2006 07:46:03 -0800, Todd wrote:

:

On Mon, 16 Jan 2006 14:47:02 -0800, Todd wrote:

In one of my tables I have a field that contains text as follows- “Candlewood
Hotelâ€. In the same field in the next entry it may contain AWA Flight. Is
it possible to do a filter on just one of the words in the field i.e.
Hotel? Then only display all entries with the word that was filtered?

In a query you would use as criteria on that field:

Like "*" & [What word?] & "*"
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

OK that worked Thanks for the help. OK now that I have the info I want for
the report how would I filter out the word hotel and flight ect. in the
report?

Todd

What does 'filter out' mean?
You want to return all records except those that include Hotel or
flight ect.?

As query criteria, write:

Not Like "*" & [What word?] & "*"

Using your example ....
In your report, add an Unbound text control.
Set it's Control Source to:
=IIf(InStr([YourField],"Hotel")>0,Left([RourField],InStr([YourField],"Hotel")-1),[[YourField])

If the field contains for example "Holiday Inn Hotel" or "Hilton
Hotel" only "Holiday Inn" or "Hilton" will display. If the field does
not include the word Hotel then the entire field will display.

What do you want to happen of the hotel name is "Hotel Astoria"?
--
Now that's a good question. I guess I just wont book my people into the
Hotel Astoria......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top