Microsoft Office 2007 Access Queries


  1. Posts : 107
    Micro$oft Windows 7 Ultimate x64
       #1

    Microsoft Office 2007 Access Queries


    Hello. I am writing an Access Database which will hold a lot of information about software, books and whatever else I am going to store in there. (Yes, Data entry will take a long time, but not a problem).

    I have made a query which will search the Books database for Author, and I was wondering how I can make it a little less accurate. Too weird? let me explain.

    So far, It searches for the author using Exact Matching from the input box in the query
    Code:
    [Search for author by the name of:]
    for example, when I want to search for Phillip Pullman, the way that Calibre added the author names, I have to type (Exactly, letter for letter) "Pullman, Philip". Is it possible to make it less accurate so It will bring back results when I search for "Philip" or "pullman" or "philip pullman"?


    Thanks in advance,
    DrToxic
      My Computer


  2. Posts : 238
    Win7-64
       #2

    Yes, you can do this. The key is to use the * or ? character to represent, respectively, any character string or any single character. Put these in the Criteria part of the query and you should be able to get what you want. For example

    Like "b???" will get all names that are 4 letters long and the begin with b

    Like "bea*" will get all names of any length that start with bea

    Here is the actual SQL query code for a query that works:

    SELECT [Non-GrantParticipants].Last
    FROM [Non-GrantParticipants]
    WHERE ((([Non-GrantParticipants].Last) Like "b???"));
      My Computer


  3. Posts : 107
    Micro$oft Windows 7 Ultimate x64
    Thread Starter
       #3

    ah, thank you bbinnard. :)

    Noob question alert!: Where would I put the SQL in M$ access '07?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:32.
Find Us