Results 1 to 9 of 9
  1. #1
    fluppe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    48

    field in query "not editable" ...

    Hello everybody,

    i have another, maybe qite simple problem with the access VBA ...

    I have created a Form that has a query as it's Recordsource ... works fine so far.
    Now i have a Field in the query, that i want to edit via a ComboBox Control.
    It does not work, when the CBO is bound to the field, because it is NOT EDITABLE, at least that is what i'm told.

    I can write the value to the field in the table (behind the query) by using the After Update" function, but i don't want to.
    What could be the reason for the field to be "not editable" ? I can' figure that out and i don't know what to try, so any hint would help me.

    Another thing is, that if the CBO is unbound, all CBO's (in the column) are updated simultaneously to the same value. Is there a way to avoid that by adressing the CBO by an index or smth. like that ?




    Thanks for reading anyway and thanks for hints.

    best regards,


    ...

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Some queries are not editable depending on the links. check this.
    Make sure the form property is set to dynaset
    and the form is not set to readonly
    and the combo is not locked, nor disabled.
    and the combo rowsource is correct.

  3. #3
    fluppe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    48
    Quote Originally Posted by ranman256 View Post
    Some queries are not editable depending on the links. check this.
    Make sure the form property is set to dynaset
    and the form is not set to readonly
    and the combo is not locked, nor disabled.
    and the combo rowsource is correct.
    Well, first of all: THANKS for this.
    One question still remains: What sort of links do make a query-field (and by the way: other fields in my query are editable ... the term used by access was "updateable", i just looked it up again to be sure) NOT EDITABLE. I can't see a reason for that and i don't know what i should look for.


    There is also nothing locked or disabled ...
    The row-source seems alright to me, it has the desired values and it has only one row, so there won't be datatype problems i guess.
    I'll see if the form is "Readonly", but i think it isn't....

    No, if i just open the blank query, the message is the same, so it seems to be your suggestion Nr1, but i think i don't know exactly, where to look after.

    Best regards and thanks for help,

    ...

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Is the txtbox set to locked?
    is the textbox mapped to the field in the query?
    is the field an actual editable field? (try editing data in the query.field NOT thru the form)

  5. #5
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    It might be helpful if you post the SQL code of your query too.
    Certain query types, like Aggregate Queries and Union queries are not updateable.

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Allen Browne has an excellent article that explains why many Multi-Table Queries are Read-Only:

    Why is my query read-only?

    Linq ;0)>

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    If you want to provide db for analysis, follow instructions at bottom of my post.

    Normally a form can enter/edit data for only one table. Lookup tables can be included in the form RecordSource to make related data available for viewing but do not edit fields of those tables. Related child tables should NOT be included in the RecordSource - use a subform.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    fluppe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    48
    Quote Originally Posted by JoeM View Post
    It might be helpful if you post the SQL code of your query too.
    Certain query types, like Aggregate Queries and Union queries are not updateable.
    So, here's SQL:

    Code:
    SELECT tbl_act.ContName, tbl_Cont.ContTmpID, tbl_Cont.EntryVal, tbl_Cont.ContEntry, tbl_Sub.ID AS BC_ID, tbl_act_1.ID AS CauseID, tbl_act_1.ContName AS CauseName, tbl_act.ID
    FROM ((tbl_Cont INNER JOIN tbl_act ON tbl_Cont.ContID = tbl_act.ID) INNER JOIN tbl_act AS tbl_act_1 ON tbl_act.Cause = tbl_act_1.ID) INNER JOIN tbl_Sub ON tbl_act_1.Cause = tbl_Sub.ID
    WHERE (((tbl_Cont.ContTmpID)=120) AND ((tbl_Cont.ContEntry)='Value') AND ((tbl_Sub.ID)=2));
    As you see, there are quite some tbls involved.
    @june:
    Is it thus like i can edit the fields if i only pick fields from ONE tbl here ? Or, the other way round:
    Is it impossible to edit (update) (some) fields because they are not taken from the same table ?
    I tried an example with SELECTing only from one tbl, like this :
    Code:
    SELECT tbl_Cont.ContTmpID, tbl_Cont.EntryVal,  tbl_Cont.ContEntry
    FROM ((tbl_Cont INNER  JOIN tbl_act ON tbl_Cont.ContID = tbl_act.ID) INNER JOIN tbl_act AS  tbl_act_1 ON tbl_act.Cause = tbl_act_1.ID) INNER JOIN tbl_Sub ON  tbl_act_1.Cause = tbl_Sub.ID
    WHERE (((tbl_Cont.ContTmpID)=120) AND ((tbl_Cont.ContEntry)='Value') AND ((tbl_Sub.ID)=2));
    .... but it does not work as well.

    By the way, as stated before, i can neither edit the fields without using the form, by trying to edit smth. in the query (table view), so it is not an issue of binding controls and of locked controls and so on ... well, maybe that may come later as well. For now, it seems my query is not "UPDATEABLE" (that is the term of my access-message), and i don't know why.
    But thanks to your help, i have an idea by now, what the reason might be, so thanks a lot so far.

    Best regards,

    ...

  9. #9
    fluppe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    48
    Hi again,

    i enabled "inconsistent update" in the properties editor of my query and RrrrRiing, it is "UPDATEABLE" ...
    @missinglinq: Anyway, when i find time for it, i'll take a look at that article, but meanwhile i regard the issue as solved.

    Thousands of "thank you"'s for your useful hints and best regards,
    ...

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

Similar Threads

  1. Replies: 3
    Last Post: 04-22-2013, 06:08 AM
  2. Replies: 2
    Last Post: 09-29-2012, 11:22 PM
  3. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 AM
  4. Replies: 1
    Last Post: 08-23-2012, 08:32 AM
  5. Replies: 16
    Last Post: 07-22-2011, 09:23 AM

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