Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Parameter Query

Discussion in 'Information Technology' started by Jason, Jul 28, 2006.

  1. Jason

    Jason
    Expand Collapse
    Guest

    I have a parameter query with the following criteria

    Like "*" & [Material Name] & "*"

    When you run the query you have to put the criteria in the dialog box
    twice.

    Can someone help me fix this?

    Thank You.
     
  2. Loading...


  3. KARL DEWEY

    KARL DEWEY
    Expand Collapse
    Guest

    Post your SQL by opening the query in design view, click on menu VIEWL - SQL
    View, highlight, copy, and paste in a post.

    "Jason" wrote:

    > I have a parameter query with the following criteria
    >
    > Like "*" & [Material Name] & "*"
    >
    > When you run the query you have to put the criteria in the dialog box
    > twice.
    >
    > Can someone help me fix this?
    >
    > Thank You.
    >
    >
     
  4. Jason

    Jason
    Expand Collapse
    Guest

    Here is the SQL

    SELECT [Material Tracking].[W/O Issue Date], [Material
    Tracking].Material, [Material Tracking].[Reference SPEC #], [Material
    Tracking].[Work Order #], [Material Tracking].[Batch Number], [Material
    Tracking].[RR Number], [Material Tracking].[Test Results], [Material
    Tracking].[Failure Mode], [Material Tracking].[Testing NCR], [Material
    Tracking].[Date Released * No S of C], [Material Tracking].[Expiration
    Date], [Material Tracking].[R = Released], [Material Tracking].[Out
    Time (hr)], [Material Tracking].Comments, [Material Tracking].[S of C]
    FROM [Material Tracking]
    WHERE ((([Material Tracking].Material) Like "*" & [Material Name] &
    "*"))
    ORDER BY [Material Tracking].[Work Order #];

    Thank You!!
     
  5. Jason

    Jason
    Expand Collapse
    Guest

    If I go into the design view and change the criteria (delete 1 letter),
    save the changes, then go back in and add the letter I previously
    deleted, and save the changes, it fixes it for a couple of days. Then I
    am back to square one with typing in the criteria twice.
     
  6. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

    Make a form to ask for the criteria & use the form to get it
    ie SELECT .....,Forms!MyForrn!MyCriteria

    HTH

    Pieter

    "Jason" <jason.mooney@flycolumbia.com> wrote in message
    news:1148069329.443039.18950@i40g2000cwc.googlegroups.com...
    > If I go into the design view and change the criteria (delete 1 letter),
    > save the changes, then go back in and add the letter I previously
    > deleted, and save the changes, it fixes it for a couple of days. Then I
    > am back to square one with typing in the criteria twice.
    >
     
  7. mystraightroad

    mystraightroad
    Expand Collapse
    Guest

    might be worth taking out the spaces from table/field names - see if
    that helps
     
  8. Jason

    Jason
    Expand Collapse
    Guest

    if i do that will it mess up my other queries, forms, reports, etc.??
     
  9. gee664@gmail.com

    gee664@gmail.com
    Expand Collapse
    Guest

    This worked for me in the past:

    When in query design view: goto the toolbar>query>query parameter.
    Add your parameter name to the list and specify a data type.
     

Share This Page