Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Posts
    2

    Unanswered: Second Parameter in Query

    I've created a database in Access 2000 to record customer information for an appliance installation business. The parameters in my query have been set to request an installation date before producing a report with the selected information. It then pulls up information for just that date. What I am trying to do is add a second parameter to ask for the installer (there are two now, there was just one) also, so that I can print seperate reports for both installers based on the date of work. My current parameter looks like this:

    PARAMETERS [Install Date] DateTime;
    SELECT [Work Order Input].[Customer First Name], [Work Order Input].[Customer Last Name], [Work Order Input].[POS Store], [Work Order Input].[Store Number], [Work Order Input].[Customer Street Address], [Work Order Input].[City], [Work Order Input].[State], [Work Order Input].[Zip Code], [Work Order Input].[Customer Home Number], [Work Order Input].[Customer Work Number], [Work Order Input].[Date of Install], [Work Order Input].[Time Window], [Work Order Input].[Location of Appliance], [Work Order Input].[Product], [Work Order Input].[Second Product], [Work Order Input].[Third Product], [Work Order Input].[Fourth Product], [Work Order Input].[ROS/PO Number], [Work Order Input].[Work Order Number], [Work Order Input].[Map Page], [Work Order Input].[Map Square], [Work Order Input].[Notes], [Work Order Input].[Call Status], [Work Order Input].[Job Status], [Work Order Input].[Installer]
    FROM [Work Order Input]
    WHERE ((([Date of Install ])=[Install Date]) And (([Installer])=[Installer]))
    ORDER BY [Work Order Input].[Time Window];


    How and where would I add the information to make the query ask for an installer's name before printing a report? The installer information is in [Work Order Input].[Installer], and on the attached form is a drop down selection box.

    Thank you for any help.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    From a Form works pretty good. That way you can select the date from a Calendar control and the installer from a ComboBox which lists all the installers (you may have ten of them one day).

    SELECT * FROM [Work Order Input]
    WHERE [Date of Install]=#" & Me.[Install Date] & "# And [Installer]='" & Me.[Installer] & "' ORDER BY [Time Window];


    .
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  3. #3
    Join Date
    Aug 2006
    Posts
    2

    I found the answer

    Here is how I solved the parameter issue:


    PARAMETERS [Install Date] DateTime, [Installer Name] Text ( 255 );
    SELECT [Work Order Input].[Customer First Name], [Work Order Input].[Customer Last Name], [Work Order Input].[POS Store], [Work Order Input].[Store Number], [Work Order Input].[Customer Street Address], [Work Order Input].[City], [Work Order Input].[State], [Work Order Input].[Zip Code], [Work Order Input].[Customer Home Number], [Work Order Input].[Customer Work Number], [Work Order Input].[Date of Install], [Work Order Input].[Time Window], [Work Order Input].[Location of Appliance], [Work Order Input].[Product], [Work Order Input].[Second Product], [Work Order Input].[Third Product], [Work Order Input].[Fourth Product], [Work Order Input].[ROS/PO Number], [Work Order Input].[Work Order Number], [Work Order Input].[Map Page], [Work Order Input].[Map Square], [Work Order Input].[Notes], [Work Order Input].[Call Status], [Work Order Input].[Job Status], [Work Order Input].[Installer]
    FROM [Work Order Input]
    WHERE ((([Date of Install ])=[Install Date])
    And (([Installer]) Like [Installer Name]))
    ORDER BY [Work Order Input].[Time Window];

Posting Permissions

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