Results 1 to 12 of 12
  1. #1
    TracyBell is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    23

    Control can't be edited

    I'm new to creating combo boxes in my forms, rather than a lookup field in a table, and coming across this error in one of combo boxes.

    "Control can't be edited; it's bound to an unknown field"

    I created it with the wizard the same way I created several other combo boxes that are working fine. The form itself is based off a query, but when I created the combo box I pulled from the table.



    Please help!
    Thanks in advance,
    Tracy

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    The bound field of the combo box be a field in the form's record source (your query). By chance does the query on which the form is bound include the same table that you used for the combo box? If so, you will need to remove that table from the query.

  3. #3
    TracyBell is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    23
    Yes, the bound field is in the same query that the form is bound to. Is it better to just have the form bound to the table rather than the query?

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Is it better to just have the form bound to the table rather than the query?
    It really depends on the specific thing you are doing with the form.

    Does the query used for the form include the table that is used by the combo box? Can you provide the SQL text of the query used for the form as well as the row source of the combo box?

  5. #5
    TracyBell is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    23
    Yes, the query used for the form includes the table that is used by the combo box. As I'm going through some re-design of the database to make it more normalized, I have moved so much out of this particular form I'm thinking it should just be bound to the table itself, but which one? 4 fields bound to 3 different tables. Therefore I guess it should stay bound to the query. Subforms will be included as well.

    Here's the SQL text of the query: SELECT tblOwner.OwnerID, tblProperty.PropertyID, tblUnit.UnitID, tblUnit.UnitAddressDetail, tblUnit.CurrentUnit, tblOwner.pkAutoID AS OwnerAutoID, tblOwnerPMAgreement.pkAutoID AS PMAgmtAutoID, tblProperty.pkAutoID AS PropertyAutoID, tblUnit.pkAutoID AS UnitAutoID
    FROM tblOwner INNER JOIN ((tblOwnerPMAgreement INNER JOIN tblProperty ON tblOwnerPMAgreement.pkAutoID=tblProperty.fkOwnerID ) INNER JOIN tblUnit ON (tblOwnerPMAgreement.pkAutoID=tblUnit.OwnerID) AND (tblProperty.pkAutoID=tblUnit.PropertyID)) ON tblOwner.pkAutoID=tblOwnerPMAgreement.fkOwnerID
    WHERE (((tblUnit.CurrentUnit)=Yes))
    ORDER BY tblOwner.OwnerID, tblProperty.PropertyID, tblUnit.UnitID;

    I have tried the combo box two different ways. Here's the first:

    SELECT qryTenancyUnitInfo.UnitID, qryTenancyUnitInfo.UnitAutoID <actual field is tblUnit.pkAutoID>
    FROM qryTenancyUnitInfo
    ORDER BY qryTenancyUnitInfo.[UnitID];

    and here's the second:
    SELECT tblUnit.pkAutoID, tblUnit.UnitID, tblUnit.UnitAddressDetail
    FROM tblUnit
    ORDER BY tblUnit.[UnitID];

    The first one shows #Name? and the second one is blank. When I try selecting from the drop down in either one I get the error previously mentioned.

    Thanks for your help.

  6. #6
    TracyBell is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    23
    By the way, two other combo boxes are on the form are also part of the table in the query that's bound to the form and they work fine.

    Here is one of the combo boxes that is working:
    SELECT tblProperty.pkAutoID, tblProperty.PropertyID
    FROM tblProperty
    ORDER BY tblProperty.PropertyID;

  7. #7
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    I would drop the tables that populate the combo boxes from the query bound to the form and see if that helps.

  8. #8
    TracyBell is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    23
    If I remove the table from the bound query, where do I store the value for that field?

  9. #9
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Doesn't the main table have a foreign key field that is joined to the table that you used for combo box

    As an example, if you have a table that holds information about people including a title and you have the possible titles stored in another table, you would have a foreign key field for the title in your people table.


    tblPeople
    -pkPeopleID primary key, autonumber
    -fkTitleID foreign key to tblTitle
    -txtFName
    -txtLName

    tblTitle (holds records such as Mr. , Mrs., Dr. etc.)

    In this case, I would use a form bound to tblPeople and on that form use a combo box whose row source is tblTitle and the combo box would be bound to fkTitleID.

  10. #10
    TracyBell is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    23
    OK, I got it to show me the accurate record in the combo box, but I still can't change anything. And I can't add a new record.

  11. #11
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Any chance you can post your database with any sensitive data removed?

  12. #12
    TracyBell is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    23
    I'll email it to you. Would rather not post. :-)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 03-14-2011, 09:37 AM
  2. Access XP - trap 'The text is too long to be edited'
    By AccessPoint in forum Programming
    Replies: 2
    Last Post: 09-13-2010, 04:30 PM
  3. Replies: 1
    Last Post: 06-23-2010, 09:05 AM
  4. Adding 'Last Edited' Date
    By vCallNSPF in forum Forms
    Replies: 2
    Last Post: 12-16-2009, 04:36 PM
  5. form not letting records be edited
    By stuart rose in forum Forms
    Replies: 3
    Last Post: 09-02-2009, 04:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums