Results 1 to 5 of 5

Thread: Access 2007

  1. #1
    Join Date
    Jun 2008
    Posts
    2

    Unanswered: Access 2007

    We upgraded to Access 2007. After the upgrade, we can no longer delete records in subforms. It works well in 2003 but has problem in 2007. We can add records in 2007 but cannot delete records from any form. The code behind delete button is: DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

    The default view property of the subform a Single form

    So can you please help me with this issue.

    ThankYou in advance.

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    Have used 2007

    try using the wizard to create a buttom that delete a records

    see if its the same as the
    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

    think the acMenuVer70 could be differance
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    This is precisely why I have NEVER recommended using DoMenuItem.

    Try using explicit commands such as DoCmd.RunCommand acCmdDeleteRecord rather than DoMenuItem.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Jun 2008
    Posts
    2
    Hi,

    I tried using DoCmd.RunCommand acCmdDeleteRecord instead of DoMenuItem,
    but it did'nt work in Access 2007. I tried to use it in 2003 and it did work. Can you tell me what might be the problem?

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    What do you mean it didn't work? Did you get an error message? Does it compile?

    I just made a delete button with this line of code in an Access 2007 db to ensure it works and it did.

    Perhaps you have a references problem?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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