Results 1 to 4 of 4
  1. #1
    KissBambi is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2019
    Posts
    6

    DB with a single table query displays all recordds and not the one I want

    Hello everyone from Switzerland.

    I created a table of job offers and when I create an SQL query for Access to return the records to me according to well-defined search criteria, Access returns all the data from the table!
    Can not display only the results of this or that category of professions, same thing to display allelements ads in an interval between 2 dates! I must obligatorily use Access 2007 and I ream completely!

    Would someone have a solution?


    Here is the SQL code of my request

    PARAMETERS [Geben Sie ein Beruf ein :] Text ( 255 );
    SELECT Anzeige.Beschreibung, Anzeige.Kundenname, Anzeige.Publikationname, Anzeige.Position, Anzeige.Pensum, Anzeige.Rubrik, Anzeige.PLZ, Anzeige.Ort, Anzeige.Datum, Anzeige.Kontakt, Anzeige.Sprache, Anzeige.[E-mail], Anzeige.Webseite, Anzeige.Telefonnummer
    FROM Anzeige
    WHERE (((Anzeige.Publikationname) Like [Publikationname]));

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Well, Publikationname is the same as Publikationname, so of course all records are returned.

    Perhaps you want:

    WHERE Anzeige.Publikationname = [Geben Sie ein Beruf ein :];

    Review http://allenbrowne.com/ser-62.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    KissBambi is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2019
    Posts
    6

    Thank you to reply me

    Quote Originally Posted by June7 View Post
    Well, Publikationname is the same as Publikationname, so of course all records are returned.

    Perhaps you want:

    WHERE Anzeige.Publikationname = [Geben Sie ein Beruf ein :];

    Review http://allenbrowne.com/ser-62.html
    Yes, you're right. On another forum a software engineer has sent me this code :

    PARAMETERS Beruf Text ( 255 );
    SELECT Anzeige.[Beschreibung], Anzeige.[Kundenname], Anzeige.[Publikationname], Anzeige.[Position], Anzeige.[Pensum], Anzeige.[Rubrik], Anzeige.[PLZ], Anzeige.[Ort], Anzeige.[Datum], Anzeige.[Kontakt], Anzeige.[Sprache], Anzeige.[E-mail], Anzeige.[Webseite], Anzeige.[Telefonnummer]
    FROM Anzeige
    WHERE Anzeige.Publikationname LIKE [Beruf ];

    This code gives no record back.

    In fact Access should compares the string entered in PARAMETERS with the string contained in Field Anzeige.Publikationname.

    Can you help me please ? I need you and your help is very precious

    Best reguards

  4. #4
    KissBambi is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2019
    Posts
    6

    Lightbulb Thank you to reply me. Problem is solved

    PARAMETERS Beruf Text ( 255 );
    SELECT Anzeige.[Beschreibung], Anzeige.[Kundenname], Anzeige.[Publikationname], Anzeige.[Position], Anzeige.[Pensum], Anzeige.[Rubrik], Anzeige.[PLZ], Anzeige.[Ort], Anzeige.[Datum], Anzeige.[Kontakt], Anzeige.[Sprache], Anzeige.[E-mail], Anzeige.[Webseite], Anzeige.[Telefonnummer]
    FROM Anzeige
    WHERE Anzeige.Publikationname LIKE "*" & [Beruf ] & "*";

    This perfectly functions. I wish you all the best

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 17
    Last Post: 06-07-2018, 01:27 AM
  2. Append Query for a Table with a Single Field
    By Kluaoha in forum Queries
    Replies: 4
    Last Post: 08-01-2017, 03:09 PM
  3. Query for mismatch data on a single table
    By JFonz in forum Queries
    Replies: 2
    Last Post: 08-01-2016, 12:20 PM
  4. Replies: 11
    Last Post: 04-23-2016, 11:04 AM
  5. Replies: 3
    Last Post: 08-02-2015, 12:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums