Search results

  1. T

    Multiple parameter query and empty parameter

    Ok so if I take out the close, which is fine, then in its place I'd have Me.Requery?
  2. T

    Multiple parameter query and empty parameter

    Just making sure I understand on the DMin/DMax parts... make a text box for start and one for end, then in the properties of each text do the full DMin/DMax code in the control source property? And do I need to add anything other than: Private Sub cmdOk_Click() DoCmd.OpenQuery "Query1"...
  3. T

    Multiple parameter query and empty parameter

    That makes a LOT more sense! The code I posted just came from the sql view of the design grid for the query. The way you have it written clearly puts it all together as it should run. I just ran this several times with every combination I could think of and it works exactly right!! I can't...
  4. T

    Multiple parameter query and empty parameter

    I just noticed when I run this one, the resulting datasheet has two extra columns with the Pass and Institutions as expressions in there. Access keeps adding that "As Expression" and won't let me take it out, but in the code you provided it wasn't there. How do I fix that?
  5. T

    Multiple parameter query and empty parameter

    SELECT testdata.ID, testdata.LastName, testdata.FirstName, testdata.Institution, testdata.ResultDate, testdata.PASS, testdata.Score, testdata.LAW, testdata.SS, testdata.SC, testdata.LAR, testdata.MAT, [Pass:] AS Expr1 FROM testdata WHERE (((testdata.Institution)=[Institution:]) AND...
  6. T

    Multiple parameter query and empty parameter

    I spoke too soon LOL. Have put the code into the real database and it's not working like it did in the test database. not sure why, it's done the same. Here is the code that is now not working: SELECT GEDdata.[DOC#], GEDdata.Lastname, GEDdata.Firstname, GEDdata.Institution, GEDdata.ResultDate...
  7. T

    Multiple parameter query and empty parameter

    That worked perfectly thank you so much for all your help!! I can now search on all three/four fields in any combination I want and get the correct results. This is going to help me with another database I was having trouble with before I think, can't wait to try it out on that one as well...
  8. T

    Multiple parameter query and empty parameter

    I tried to search on the one you sent back, the dates work perfectly and I can do any combination of the dates and institution and return what I want to see. Thank you for that. My question now is how do I add in that pass field to further filter results based on the pass/fail status? I'm...
  9. T

    Multiple parameter query and empty parameter

    I didn't post what I tried since I couldn't get it to work, plus I got pulled off to do another project and couldn't get back to this til yesterday. I have meetings this morning so will take a look at what you uploaded this afternoon, thank you.
  10. T

    Multiple parameter query and empty parameter

    Attaching the db with sample data in case anyone has time to look through it and help me figure this out. vbaInet, I looked through the links you provided and still haven't been able to get anything to return the results I need returned. Clearly I'm not code-literate enough to understand how...
  11. T

    Multiple parameter query and empty parameter

    Thanks for sticking with me through this and clarifying things :) Yes, I want to enter a value for all three of those and find the criteria matching those. I also want to be able to leave out either institution or the dates and still return values. (pass/fail as well) The last code I posted...
  12. T

    Multiple parameter query and empty parameter

    That's what I'm trying now, and the link that had the report in it since filtering into a report is our main goal.
  13. T

    Multiple parameter query and empty parameter

    Just looked again and the code with AND... doesn't work. the code with OR works the way I want it to
  14. T

    Multiple parameter query and empty parameter

    I think I never should have posted the codes that were not working, seems to have confused the issue greatly. Let's just look at this code then: SELECT DeadRecords.[DOC#], DeadRecords.Lastname, DeadRecords.Firstname, DeadRecords.Institution, DeadRecords.ResultDate, DeadRecords.Pass...
  15. T

    Multiple parameter query and empty parameter

    Ok great... what do I need to change it to to get it to work?
  16. T

    Multiple parameter query and empty parameter

    Right, and the code that I said works from my first post... are AND not OR. So why can't I have the pass/fail working in that same code?
  17. T

    Multiple parameter query and empty parameter

    Thanks I'll look into that as well, and I think after this discussion we've realized a form is what we need as long as I can have the results filter directly into a report. In my first post I believe I posted the code that works with two criteria and are AND not OR statements. These are...
  18. T

    Multiple parameter query and empty parameter

    Right, but what we need is to be able to enter 0 or -1 into the parameter input box when it comes up. That's how the other two criteria are set up and how they work, and how this one works when I have it in a query on it's own. If I do just the pass as you suggest, then I have to write a whole...
  19. T

    Multiple parameter query and empty parameter

    That just did what leaving the pass/fail field out entirely did... it returned all records whether passed or failed and I need to be able to return passes or fails in that search.
  20. T

    Multiple parameter query and empty parameter

    So the line of code would look like this:? WHERE (((DeadRecords.Institution)=[Instutition:])) OR (((DeadRecords.ResultDate) Between [Start Date:] And [End Date:])) OR (((DeadRecords.Pass)=Yes OR (DeadRecords.Pass)=NO));
Back
Top Bottom