Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Creating an uneditable combobox that still allows text entry with autocomplete

Posted on 2004-10-21
Medium Priority
Last Modified: 2008-02-01
Here is my problem.  

I have a form in my MS Access DB that shows a current part number and its associated details.  I currently have the part number in a combobox, when you select the part that you want the details are shown in the fields below.  

What I would like to have is that I can type a part number (or a portion of it, with autocomplete) and hit enter, and have the part details shown below.  Currently when I make the combobox editable, such that I can type text into it, I instead end up changing the part number for the record currently shown.  Otherwise my combobox works as expected, you can click the down arrow, select a part number, and the details are displayed correctly.

Any thoughts/Recommendations?

Question by:ShadowedOne
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 11

Expert Comment

ID: 12373360
Double check your combo box properties. Make sure that the "Limit to List" property is set to "YES".

Author Comment

ID: 12374183
"Limit to List" is set to "Yes".  Which is working correctly.  However this does not prevent me from changing the part number to that of another part in the DB.

Thanks for the help.
LVL 11

Accepted Solution

Jokra_the_Barbarian earned 500 total points
ID: 12374523
I think I understand what's happening. Here's what you need to do...

1. View the properties for your part number combo box.
  a. On the data tab, the "Control Source" should be blank. If there is a value there, delete it.
2. On the Event tab, create an [Event Procedure] for the "After Update" event for the combo box.
  b. Within this event, paste code similar to the following:
            Me.Filter = "[Part Number] = " & Me.Combo0
            Me.FilterOn = True

You were experiencing problems because the combo box was bound to the table field.


Author Comment

ID: 12375528
That worked.   I ended up not using the VB code, but removing the "Control Source" reference worked perfectly.

Thanks much for your help!


Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question