Results 1 to 4 of 4

Thread: Retrieving All Records

  1. #1
    Join Date
    Apr 2007
    Posts
    13

    Retrieving All Records

    Just a quick question.

    I have a basic SQL query which is accessing data from a parts table

    Select *
    FROM Parts
    where Description = 'MM_Part'

    MMPart:
    default value: ????
    Request.Form("PartSelector")

    What value would i put in the default value to select all the records??? I have tried % but it doesnt seem to work.

    Just so you know i am using MS acess with dreamweaver

    Thanks

  2. #2
    Join Date
    May 2006
    Posts
    407
    WHERE Description Like "MM_Part*"

  3. #3
    Join Date
    Apr 2007
    Posts
    13
    Hi

    That code doesnt really do what i want it to do.

    What i want is a drop down menu that can select a part, from [part], based on the description.

    However, i also want an option which allows the user to select all parts from [part]

    The code

    WHERE description Like "MM_Part*" did not work for any value of Description. If i take the * out it works, but it still only filters results. I need a value that can be submitted under the variable MM_Part, which selects all the parts based on description

  4. #4
    Join Date
    May 2006
    Posts
    407
    The best way to select all parts, based on description is to not base the selection on description. By that I mean, if you do not want description to be involved in the selection process, then do NOT include description in the selection process. For example, if you want all descriptions (which is what you are saying), then create the SQL like this: "SELECT * FROM Parts;" That will select all descriptions.

Posting Permissions

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