Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2007
    Posts
    12

    Unanswered: User input criteria

    When there is a user input for an query criteria, is there anyway the user can query all of existing entries instead of just the limited number of set input?

    For example, say the data is like this

    (A,1),(B,1),(C,1),(A,2),(A,3),(B,5)

    if user enters "A" for the criteria, they will get all the "A"s. What if they want all of the A's, B's, and C's?

    Now, imagine there are unlimited number of entries.

    As well, I know I can get rid of the user input to achieve this but the user input element must be maintained.

    Any easy way to achieve this?

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    why not kill the user?
    the user seems to serve no purpose in your application.

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Oct 2007
    Posts
    12
    excuse me?

    It's part of a bigger problem. I am just posting a specific questions.

    specific criteria is required on certain function and no specific criteria is also needed.
    Last edited by lazyme; 10-01-07 at 12:49.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    well, you ask the user to enter criteria - and then you get rid of the criteria and dump an unlimited set of data on the poor unfortunate.

    can you clarify what you are looking for.

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    dim strSQL as string
    strSQL = "SELECT * FROM tblBlah WHERE someField = '" & me.someText & "'"
    ...do something with strSQL e.g.
    me.myList1.rowsource = strSQL
    ...and then
    strSQL = "SELECT * FROM tblBlah"
    ...do something with strSQL e.g.
    me.myList2.rowsource = strSQL

    izy
    currently using SS 2008R2

  6. #6
    Join Date
    Oct 2007
    Posts
    12
    The query is linked to different excel workbook for pulling data for the different accounts.

    Each accounts has their individual workbook with the set defined account names as their critiera.

    A seperate workbook also combined all the results.

    It will very longer to explain the scope and design of the whole project.

    The specific question is:
    Is there anyway to get all the data when there is a user input field as criteria. I was thinking may be using "*" will get all the data but that didn't work.

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    where do you want the pulled data to end-up?
    report, form, some other XLS, or?

    izy

    LATER: ...asking because for reports it is different, most other stuff is just in-line SQL as previous post

    LATER STILL: ...do you want the detail records or some aggregate function (e.g. count, sum) of one field
    Last edited by izyrider; 10-01-07 at 13:14.
    currently using SS 2008R2

  8. #8
    Join Date
    Oct 2007
    Posts
    12
    The report is in excel.

    Thanks for your help izyrider. I figure out what I needed to do.

  9. #9
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    What did you need to do?
    George
    Home | Blog

Posting Permissions

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