Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2004
    Posts
    17

    Lightbulb Unanswered: Add "ALL" to a listbox

    my previous thread, the solution to that problem is adding ALL to the list box. if anyone knows how to do it, please help. the list box rowsource is table/query.

  2. #2
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    259
    i looked at ur previous thread; i think the reason why it doesn't work is becuase you cant put Me.Something.Value = Null ... Shouldn't it be IsNull(Me.Something.Value) OR Me.Somehing.Value = "" ...

    however, debug ur code, and go step by step. if it enters the is null thing, then check it...i'm sure thats where u prob lies...in fact, that is where ur prob lies (u told that in ur post)

    otherwise, we can figure out another soln..

  3. #3
    Join Date
    Apr 2004
    Posts
    17
    i debugged the code, and did a quick watch to see the value of the empty listbox, and access is telling me that the value is null. now if the SQL string stops at that value, it works good and spits out the reults needed, but once you add the 2nd condition with the checkbox thats when it losses track of the value, so the best way, and easiest way is to add ALL to the listbox. at least thats what i think.

    anymore suggestions

  4. #4
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    259
    lol let me get the purpose of that SQL statement straight;
    SQL statement is for a query? a report?
    the first part works fine....
    if the checkbox is checked, then you have to show the date?
    if it is not,
    dont have to show the date?

    all this in a report? upon clickin it, it opens a report? a query/?

  5. #5
    Join Date
    Apr 2004
    Posts
    17
    i will attach the code so you can see it.
    Attached Files Attached Files

  6. #6
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    259
    hmm the code seems fine. But the problem lies at the INNER JOIN. In this case, debugging wont help since the query string is executed at the end...

    for that specific case thats causing you grief, paste that query expression into a new query design in SQL View and see if it runs...for that case though...

    and also, add a ";" at the end...wont make a diff i think but try that...

    both these mehtods, try that.

  7. #7
    Join Date
    Apr 2004
    Posts
    17
    Originally posted by Jerrie
    hmm the code seems fine. But the problem lies at the INNER JOIN. In this case, debugging wont help since the query string is executed at the end...

    for that specific case thats causing you grief, paste that query expression into a new query design in SQL View and see if it runs...for that case though...

    and also, add a ";" at the end...wont make a diff i think but try that...

    both these mehtods, try that.
    I pasted the SQL in a new query that would ask for the id or the "value" of the FacilityID, it works good, which makes me even more confussed. i also tried entering a zero'0' for the value, and it pulled the right info out to the report. yeap the way is to added "ALL" and asign its value to Null. for those that are looking for this code, there are 2 ways of doing it,
    1) http://support.microsoft.com/?kbid=210290 (calling a function)
    2)http://www.mvps.org/access/forms/frm0043.htm (doing it thru rowsource)

    thanks Jerrie

Posting Permissions

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