Results 1 to 5 of 5

Thread: Query issue

  1. #1
    Join Date
    Mar 2004
    Posts
    55

    Unanswered: Query issue

    I want to be able to work with only certain records in a query.
    I'd like it to ask for or give me a drop down list of printer names when the query is run so that I can select info pertaining only to that particular printer. I have a table with multiple printer names in it and need to do some calculations pertaining to only whichever printer is selected at a particular time. Can I do this?

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    What are the fields in your table containing the printers' names? Is it only one field? Try to make another filed through which you can set your criteria to select your printers....

  3. #3
    Join Date
    Apr 2004
    Posts
    110
    You can create a parameter query. Just set values for your criteria fields! You can then place a list box on a form and set it`s recordsource property to the qeury just created. The code wou look like this :

    [A_List].RowSource = "My_query".
    Attached Thumbnails Attached Thumbnails green_ant.gif  

  4. #4
    Join Date
    Mar 2004
    Posts
    55
    The important fields I need to keep track of are
    PrinterName, PageCount, DefectiveToner(Y/N). The PrinterName field is linked to a table with PrinterName, Make, Model, SerialNumber.

    The whole point is to be able to query a specific printer (we have about 150) to see if we are getting the page counts guaranteed by our supplier, and to determine the average page count per model, to help determine ordering needs.
    So far I have a form that the helpdesk person will enter name of printer, page count, and wether it is was replacing defective toner or not, (we seem to get about 6 defectives per month with all the toner we use). I need to take that info and be able to separate the printers by printer name, then do subtraction between the most recent page count and the one before to determine the total pages printed, determine an average based on the number of toner changes versus the number of pages printed, and so on.
    This is turning out to be a big project for me, I haven't used access in years and I almost feel over my head.... good grief!

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Classic parameter report.

    Populate your combo box with all the printer names and perhaps an id field.

    Then set the recordsource for your report to include a where clause similar to this:

    SELECT stuff
    FROM stuff
    WHERE stuff_id = ?

    Then in the query parameters property set it to ? = forms!yourForm!yourCombo.Value

Posting Permissions

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