Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using # and * in query, NOT as wild cards

Status
Not open for further replies.

enthrop

Technical User
Jun 17, 2003
14
US
This basic thing seem to have slipped my mind due to in use...

When designing a query, how do I scan for the STRING # and * without them being used as wildcards?

Thanks.
 
Heh, I seem to like replying to my own posts..

Follow up question.

Say i have a table with a column, "Company Name," located in table tblCompany. (other columns have info about the company).

Over the course of time, things have been marked for deletion if the company name has a * attached to the end.

I also have another table (tblName) which is a big table of names.

The two are related by a 1 to many relation where each company has a unique "Company Key" (from tblCompany) and each name is related to a company (via the Company Key).

Therefore, whenever I want to delete a company, if I'm working through tblCompany, I have to open the subdatasheet for the tblNames and delete those names, then delete the company (otherwise Access won't let me 'cause the relation still exists).

Is there a way I can, once again, either make this more efficient (through a query?) or more automated?

It's a lot for me to scroll through these companies trying to eyeball things with "*"s and then deleting first the people, than the company.
 
Instead of wild-card, use instr() for criteria...

InStr([myfield], "*") > 0
InStr([myfield], "#") > 0


Mike Pastore

Hats off to (Roy) Harper
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top