Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601

    Exclamation Unanswered: Using "All" From a combobox and Weird table

    Hey.

    I have about 7 reports that I used a small form to call them. I have made a combo box that gets the team if it exsists in the employee table and filter some of the forms correctly. I haven't implemented it fully yet. I have gotten the "all" to show on the drop down. But it still filters, and gets no hits. How can I make to not filter on "all"?

    Each time I run a report I get a new table amd/or record in a table called "Name AutoCorrect Log." Any ideas why this is going on?
    Ryan
    My Blog

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Shake...Shake... Shake.... What?

    Try editing your post with a little more explaination please. Something a little clearer.

    As for the "Name AutoCorrect Log". What's in the Log? This should give you a pretty good idea of what it's for. In any case...go into the Access Tools menu then select Options. Under the General tab, turn off (un-check) the "Log name AutoCorrect changes" property located in the Name AutoCorrect section. Then delete the table....you don't need it.


  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    durrr... what?

    Maybe use an iif() statement to set the filter to "*" if your combobox value is "all"?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Quote Originally Posted by CyberLynx
    Shake...Shake... Shake.... What?

    Try editing your post with a little more explaination please. Something a little clearer.

    As for the "Name AutoCorrect Log". What's in the Log? This should give you a pretty good idea of what it's for. In any case...go into the Access Tools menu then select Options. Under the General tab, turn off (un-check) the "Log name AutoCorrect changes" property located in the Name AutoCorrect section. Then delete the table....you don't need it.

    It has Object Type, Object Name, Control Name, Property name, Old Value, New Value as fields... Just has it for one table. I just replaced my code with what is under "New Value" and still that table gets a new record...Just curious why it started appearing
    Ryan
    My Blog

  5. #5
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Quote Originally Posted by Teddy
    durrr... what?

    Maybe use an iif() statement to set the filter to "*" if your combobox value is "all"?
    Ok how do I use a filter to turn off a filter...
    Ryan
    My Blog

  6. #6
    Join Date
    Jun 2004
    Posts
    14

    Red face

    I would use an if statement in the following manner:

    sub onclick_report

    if cmb1.value = "*" then
    strreport name = The report for all
    'create a new query to reference everything and create a new report for the new query
    else
    strReport name = The original report name/ orginal query.

    This will work, guaranteed.

  7. #7
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Quote Originally Posted by jpetter7
    I would use an if statement in the following manner:

    sub onclick_report

    if cmb1.value = "*" then
    strreport name = The report for all
    'create a new query to reference everything and create a new report for the new query
    else
    strReport name = The original report name/ orginal query.

    This will work, guaranteed.
    Do I put this in an event or in general VBA Editor? I am not sure what you mean by "The report for all"
    Ryan
    My Blog

  8. #8
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Any suggestions here?

    This is my row source for the combo:
    Code:
    SELECT DISTINCT Employees.Team
    FROM Employees
    UNION SELECT "All" 
    FROM Employees (Where All Like 'AB%');
    And for my Query...
    Code:
    SELECT [LastName]+", "+[FirstName]+" "+IIf([middleInitial],[middleInitial],"")
    AS FullName, Employees.*
    FROM Employees
    WHERE 
    (((Employees.Team)=IIf([Forms]![SelectReport1]="All","*",
    [Forms]![SelectReport1]![combo7])))
    ORDER BY Employees.LastName;
    Last edited by rguy84; 08-24-04 at 13:32.
    Ryan
    My 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
  •