+ Reply to Thread
Results 1 to 5 of 5

Open a form in Edit mode using VBA

  1. #1
    Valued Forum Contributor
    Join Date
    01-10-2011
    Location
    swindon, england
    MS-Off Ver
    Excel 2010
    Posts
    317

    Open a form in Edit mode using VBA

    Hi

    Can anyone figure why when I open a form in Access 2007 using VBA code, it will not allow the record to be edited?

    I have two forms. The first one, which is a split Form, and the second one which is a datasheet. I have added a button on the first form so that when selected it will run the code which displays an inbox so the user can enter a ID number, then it opens the second form and filters the form to show only the id number entered. However when the form opens the records in it can not be edited. The code I am using is below:

    Please Login or Register  to view this content.
    I have checked the properties of the second screen and there is no record lock, and the permissions are set to allow edits. Is it because I am filtering the data?

    Can anyone help??

    Thank you in advanced

    Jeskit
    Last edited by jeskit; 04-19-2012 at 04:04 AM.

  2. #2
    Forum Contributor
    Join Date
    04-23-2009
    Location
    IOWA
    MS-Off Ver
    2010 Professional
    Posts
    270

    Re: Open a form in Edit mode using VBA

    Hi Jeskit,
    Is it telling you the record is not updatable?

    Check form properties: Format Tab - Allow Edits = Yes
    Please Login or Register  to view this content.
    Check the record source by itself to see if it is updateable.
    Click the ... Button next to record set which opens the query builder
    Change the view to datasheet. See if you can update a record there. If not it is an issue with your recordsource.

    Hope this helps,

    Dan
    "I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
    If my advice has been helpful to you, then please help me by clicking on the "Star" and adding to my reputation, Thanks!

  3. #3
    Valued Forum Contributor
    Join Date
    01-10-2011
    Location
    swindon, england
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Open a form in Edit mode using VBA

    Hi,

    I have checked the properties and Edits are allowed, I have checked the record source and its update-able. I find when I open the form without filtering the data it allows edits but then when I filter it it stops allowing edits.

    thanks for your help

  4. #4
    Valued Forum Contributor
    Join Date
    01-10-2011
    Location
    swindon, england
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Open a form in Edit mode using VBA

    Hi

    I have figured it out! On the first form I had a record Lock on All Records, so I changed that to No Locks and put no to Allow Edits. Its all working now.

    Thank you for all your help split_atom18

  5. #5
    Forum Contributor
    Join Date
    04-23-2009
    Location
    IOWA
    MS-Off Ver
    2010 Professional
    Posts
    270

    Re: Open a form in Edit mode using VBA

    Glad you were able to figure it out and I could help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1