Access Help

Results 1 to 2 of 2

Thread: Access Help

  1. #1
    Join Date
    Dec 1969

    Default Access Help

    Hi, I am very new to DataBases. I was wondering if someone could help me with a problem I am having with MicroSoft Access. Ill do the best I can to explain what I mean.<BR><BR>I started with a simple test table of First Names, Last Names and Phone Numbers.<BR>I then created a query that searches the last names, and for the criteria I put =[Enter Last Name]<BR>Next I made a report that uses the query.<BR><BR>So when I use the report a window pops up &#039;Enter Last Name&#039; and for example I enter "SMITH", and it finds and displays all Smiths in my table, But if I change all the Smiths in my table to "Smith otherword" and search for "Smith" It obviously would come up with nothing.<BR><BR>So my question is how do I set it up so it will search everything in the field and look for any matches?<BR><BR>Thanks, JSmith<BR>

  2. #2
    Join Date
    Dec 1969

    Default Dunno about directly in Access...

    ...but from ASP you&#039;d use SQL such as:<BR><BR>SQL = "SELECT * FROM table WHERE LastName LIKE &#039;%" & userEntry & "%&#039; "<BR><BR>I would *guess* you could do this directly in Access by making your Access query look like:<BR><BR>SELECT * FROM table WHERE LastName LIKE [enter last name]<BR><BR>And then, when you enter the name, you can enter<BR><BR>SMITH<BR>or<BR>SMITH%<BR>or<BR>%SMITH %<BR><BR>You might try that to see how it works.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts