Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3349768
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:42:19+00:00 2026-05-18T01:42:19+00:00

I’m trying to follow Microsoft’s example on how to add an All option to

  • 0

I’m trying to follow Microsoft’s example on how to add an “All” option to a ComboBox in Microsoft Access, but their article does not do an adequate job of providing guidance, aside from specifying the code.

What I’m trying to do is build a form that allows a user to select an option from a ComboBox (the options are generated from records in a table), and then build a report filtered based on the user’s selected option. The ComboBox consists of 2 columns: the primary key/ID of the records and their displayable names.

I can’t understand the VBA code Microsoft provides enough to figure out what is going on, but I would like the “All” option in my ComboBox to either have a blank primary key/ID, or one that = 0. That isn’t the case, as selecting the “All” option when using the form results in the error message “The value you entered isn’t valid for this field”. This leads me to believe that the “All” text is getting filled into the primary key/ID column instead of the display column. The example instructs me to assign the display column number as the “Tag” property of the ComboBox – and in this case, my display column number is 2. However, this (and pretty much any other value I add) results in the aforementioned error message.

Any idea if Microsoft’s example is even applicable to my case, or do I need to adjust their code somehow?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:42:20+00:00Added an answer on May 18, 2026 at 1:42 am

    Check the Control Source property of your combo box. Sounds like it may be bound to a field in the form’s record source. If you make it an unbound control (nothing in the Control Source property) you should be able to select any item from the combo’s Row Source without Access complaining at you.

    Say your combo’s Row Source is a query like this:

    SELECT id, disp_name
    FROM YourTable
    ORDER BY disp_name;
    

    You can add an “all” row with a UNION query:

    SELECT id, disp_name
    FROM YourTable
    UNION ALL
    SELECT TOP 1 0, "**ALL**"
    FROM AnyTable
    ORDER BY disp_name;
    

    AnyTable can be just that. If you happen to have a table which contains only a single row, use that one … and you wouldn’t even need the TOP 1 part. Just try not to use some ReallyBigTable as AnyTable.

    Edit: Actually some ReallyBigTable would be fine if it has a primary key or other unique field which you can use in a WHERE clause to retrieve a single row:

    SELECT id, disp_name
    FROM YourTable
    UNION ALL
    SELECT 0, "**ALL**"
    FROM ReallyBigTable
    WHERE pk_field = 1
    ORDER BY disp_name;
    

    UNION ALL will return all combined rows. If you have any duplicate rows, you can thin them out by using just UNION instead of UNION ALL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.