Recent content by johandenver

  1. J

    Filter query that may contain null values

    By the way, can I make the listbox only contain unique values? I've done this before by adding Totals and Group By in the query but I can't do that here can I?
  2. J

    Filter query that may contain null values

    PERFECT! Thank you again for all your efforts. I'm so grateful for this!
  3. J

    Filter query that may contain null values

    Stupidly "Unique Identifier" wasn't a number but I've changed that now. It works exactly as I want it to...well...almost :-) If I put a blank "Unique Identifier" then it picks up records that contain a "Unique identifier" as well. So searching for Patrick Henry returns records that should...
  4. J

    Filter query that may contain null values

    Ah, understood. I tried putting the code in a click event after the textboxes are updated. I got two errors that I've attached.
  5. J

    Filter query that may contain null values

    Thanks again :-) I tried this as rowsource of my listbox but I got the attached error: strSQL = "SELECT [Full Unitname] FROM CS WHERE " strSQL = strSQL & "Firstname = """ & Me.FirstnameBox & """" If Nz(Me.MiddlenameBox,"") <> "" Then strSQL = strSQL & " AND Middlename = """ &...
  6. J

    Filter query that may contain null values

    Yes, it seems to work :-) Thanks a million for helping me! However I want to use the query to find all records containing the specified name and display another column called "Full Unitname" in a listbox. Like this: Full Unitname Firstname Middlename Lastname Unique Identifier UnitAsia...
  7. J

    Filter query that may contain null values

    Yes, that was manually creating a query. I don't understand though, I've only ever created queries manually or as a rowsource. Should I put both pieces of code in an event code for example?
  8. J

    Filter query that may contain null values

    Thanks a lot :-) I still get a popup when creating and starting a query with it though. See attachment. Am I missing something in my installation of Access?
  9. J

    Filter query that may contain null values

    Thanks. I have some problems getting your code to work though :-) My Table is called CS and all textboxes are called ...Box so I added those the code...I also realized that the column UniqueID is actually called "Unique Identifier" with a space in it. I guess that changes the code a little as...
  10. J

    Filter query that may contain null values

    Hello! I have a problem that someone might know the answer for: I have a database with 4 columns (Firstname, Middlename, Lastname and UniqueID) I'm trying to make a query that filters out only certain people by typing names in textboxes. My problem is that Middlename and UniqueID may often...
  11. J

    Filter combo box to get "kansas" but not "arkansas"

    I've tried removing Like earlier but it made no difference. Could you give me an example for how the line should look?
  12. J

    Filter combo box to get "kansas" but not "arkansas"

    Hello! I have a combo box containing names of certain US states. When selecting a state in this box it filters results in another combo box using the selection as a criteria in a query. My problem is that when selecting "kansas" I also get all results containing "arkansas". I've tried using...
  13. J

    IIF function as criteria in a query?

    Great, that did the trick. Everything works fine now at about double the speed with the query vs loop function. Thanks a lot for all your help.
  14. J

    IIF function as criteria in a query?

    I got it to work with the looping function but it became so extremely slow that I'm now trying to get the query approach to work instead. My database has over 200'000 records, perhaps that's too big to run with the looping function. I've made two queries now, one that I use to find units from...
Back
Top Bottom