Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Sep 2005
    Location
    Milwaukee, Wisconsin, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo boxes/subforms (Access 2002)

    I have an end user having a problem with a combo box on a subform. There are 2 different subforms on a form. On one subform, there is a combo box that uses a Query for the list of values, which works fine .... the list of values displays. However, you cannot "select" one of these values & update the table/field. I checked the "control source" & "record source" properties & they look fine. The column that is bound is okay as well. I can't seem to find the problem. Does anyone have any idea what the problem is?

    I should also mention that the data being displayed in the combo box is coming from a different field & table than the field that is being updated ... can that be done?

    Thanks for any help!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo boxes/subforms (Access 2002)

    Hi Kim,

    First, check the Locked property of the Combo Box (in the Data tab of the Properties window). If it has accidentally been set to Yes, the user can open the dropdown list, but not select an item from it.

    If that is not the cause of the problem, test if you can changeany value in the subform. If not, there are several possible causes:
    - The subform as a control on the main form is locked.
    - The subform has its Allow Edits property set to No.
    - The subform has its Recordset Type property set to Snapshot.
    - The Record Source of the subform is not updatable.

    Post back if none of this helps.

  3. #3
    New Lounger
    Join Date
    Sep 2005
    Location
    Milwaukee, Wisconsin, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo boxes/subforms (Access 2002)

    Okay, I checked everything you said to check and nothing is locked, etc., everything looks fine. So here's a little more information that I'm not sure if it's correct or not:

    - Record source on the "Ports Subform" -- Ports (table)
    - Control Source of the combo box on the subform -- VLAN (field on the Ports table that is being updated)
    - Row Source Type of the combo box -- Table/Query
    - Row Source -- qryVlansAtLocation

    Here is the SQL contents of the query:

    SELECT tblVLANs.[VLAN Number]
    FROM tblVLANs
    WHERE (((tblVLANs.Location)=(SELECT Switch.Location FROM Switch WHERE Switch.SwitchKey= Forms!Switch! txtSwitchKey)));

    The query is running correctly, as it is displaying the correct options in the drop-down box, but none of the options can be selected & "written" to the "Ports" table.

    Is there something I'm missing here?
    Thanks again, in advance.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo boxes/subforms (Access 2002)

    Thank for the clear and concise information. I don't see anything that's obviously wrong. Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  5. #5
    New Lounger
    Join Date
    Sep 2005
    Location
    Milwaukee, Wisconsin, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo boxes/subforms (Access 2002)

    Okay, here is the stripped down version of the database. There are 3 forms that "interrelate", so I left them in. The problem is in the "Ports" subform, the VLAN combo box. I changed the data that's in it, not sure if it's confidential or not.

    Thanks for your help!

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo boxes/subforms (Access 2002)

    There were two problems:
    1) The bound column property of the combo box had been set to 5. This is higher than the number of columns. It should be 1.

    2) The VLAN field in Ports is related to the VLANKey field in tblVLANs, not to the VLAN Number field.
    To solve this:
    - Add the VLANKey field as first field in qryVlansAtLocation.
    - Set the Column Count of the combo box to 2.
    - Set the Column Widths property to 0";1".

    See the attached version.

  7. #7
    New Lounger
    Join Date
    Sep 2005
    Location
    Milwaukee, Wisconsin, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo boxes/subforms (Access 2002)

    Thank you very much HansV!! That solved the problem. I appreciate your help!

Posting Permissions

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