ACC2: Combo Box Column Property Returns Incorrect Information

ID: Q121455


The information in this article applies to:


SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

When you select a value in a combo box and then type over the selected value, the Column property returns information from the wrong row.


CAUSE

The correct information is not available for the Column property until after the AfterUpdate event occurs.


RESOLUTION

There are four ways to work around this problem:


STATUS

Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access version 7.0.


MORE INFORMATION

Steps to Reproduce Problem

CAUTION: Following the steps in this example will modify the sample database NWIND.MDB. You may want to back up the NWIND.MDB file, or perform these steps on a copy of the NWIND database.
  1. Start Microsoft Access and open the sample database NWIND.MDB.


  2. Open the Customer List query in Design view and drag the Contact Name field from the field list to the query grid. Save and then close the query.


  3. Open the Orders form in Design view and change the following properties for the Customer ID combo box:
    
          ColumnCount: 3
          ColumnnWidths: 2;0;2
          ListWidth: 4 


  4. Change the AfterUpdate property to the following event procedure:
    
          Sub Customer_ID_AfterUpdate()
             MsgBox Me![Customer ID].Column(2)
          End Sub 


  5. View the form in Form view and select Frankenversand in the Bill To box. Note that the name "Peter Franken" is displayed as it should be.


  6. Type Godos in the Bill To box and then press ENTER. Note that the name "Peter Franken" is displayed, instead of the correct name.



REFERENCES

For more information about the Column property, search for "Column" then "Using the Column Property" using the Microsoft Access Help menu.


Keywords          : kbusage FmsCmbo 
Version           : 2.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: April 7, 1999