Results 1 to 8 of 8
  1. #1
    zosta is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    4

    Fields lock randomly on subform


    Hi everyone..

    I have a database which is linked to several sharepoint tables (lists). These tables are queried based on choice in main form. In the main form there are several subforms built on those queries. The subforms are placed on number of pages in tab control.
    The problem is that the fields get locked randomly and do not allow any edits. The fields like dates or comboboxes can be updated using mouse, but if one tries to type in something there is no response.
    After some random clicking around, opening different pages etc. the same fields can be eventualy edited.
    The subforms, when opened as a stand alone forms, work fine and there is no problems wih locking.
    I have checked all possible "Allow edits" properties and they are all set to "yes".

    Since I cannot discover any pattern on when the field is locked and when is not, it is extremely frustrating.

    I'll be grateful for any ideas.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    look in your code for any .enabled or .locked values being set. You should also examine your dataset. If the source for the data is being re-written (i.e. a dynamically created SQL statement) there may be some problem with the SQL statement (i.e. linking one to many tables incorrectly).

  3. #3
    zosta is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    4
    Thanks. I am quite sure there is nothing of that kind in the code. All sql statements use single tables or queries. Queries are executed with .execute. I use also dao recordsets to control the content in case of no value etc. It might be that there is some conflict, but I cannot figure out where.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    did you check my other suggestion

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Quote Originally Posted by zosta View Post

    The subforms, when opened as a stand alone forms, work fine and there is no problems wih locking.

    I have checked all possible "Allow edits" properties and they are all set to "yes".
    Including the AllowEdits Property on the Main Form? Can you Edit Records on the Main Form? If AllowEdits is set to No/False for the Main Form, or if the Main Form is Read-Only, no Subform Records can be added to or edited, because they reside on Subform Controls on the Main Form, and Access considers anything you attempt to do to these Controls as 'editing.'

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    zosta is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    4
    Yes. Note that it happes occasionally that edits are possible also by using combos so Allow edits must be set to Yes.

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Given that, the on-again, off-again nature of this thing, if it were a standard database, would lead me to think about corruption of the Form. The first line of defense, for this sort of thing, is usually to create a new, blank file, and import all Objects into it. It works an amazingly large number of times, and only takes a minute or two to do..

    Few of us, here, use Sharepoint together with Access, VBA code not being functional with Sharepoint. That said, you have to wonder if the problem has to do with the network connection coming and going. Not my area of expertise, but maybe someone else will wander by who can help.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    zosta is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    4
    Looks like I have pin pointed the problem. I had two subforms on different tabs based on queries using the same table. The first subform remained locked until I clicked on the tab containing the other one. After getting back to the first one the edits were possible. When the other subform is removed it seems OK (so far). I am not sure what is causing the problem and will need to have a closer look.

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

Similar Threads

  1. Replies: 1
    Last Post: 12-28-2012, 01:56 PM
  2. Replies: 9
    Last Post: 05-12-2012, 12:16 PM
  3. Automatically Lock Fields
    By Toolman in forum Database Design
    Replies: 2
    Last Post: 05-27-2010, 10:36 AM
  4. Replies: 0
    Last Post: 03-08-2009, 05:12 PM
  5. Can I lock out fields in a form by keying off...
    By swampdonkey in forum Access
    Replies: 2
    Last Post: 09-07-2006, 07:16 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