Results 1 to 7 of 7
  1. #1
    ConnorLally is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    12

    Keep on current record when I press the edit button

    I have this form set up so that when you double click on any of the records in the "EquipmentID" fields, it opens up another form which has a button to allow you to edit that particular record. However, when I press the edit button on the new form, it goes to the first record regardless of what record is selected. Is there a way to keep on the record I have chosen when I click the button to prevent me from having to step through the records to find the one I want to edit?



    My database is enclosed in zip format for anyone to have a look at and help.

    Thanks in advance

    ITAssetDB - New Search Function.zip

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    open the new form filtering on the current record

    docmd.openform "frmEdit1Rec",,,"[empID]=" & txtEmpId

  3. #3
    ConnorLally is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    12
    The form opens on the current record, but I have an edit button on that form which allows me to edit the record. when I click that button it goes to the first record and I have to step through all of the records to find the one I want again

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Why do you need an Edit button? The form opens editable.

    You are use embedded macros and VBA - why not just VBA?
    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.

  5. #5
    ConnorLally is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    12
    The form does not open editable when I use the database.

    And I am not very experienced at using VBA, I have never really had to use VBA at all so it is all new to me, hence why I tend to gravitate towards macros

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    I double click on the EquipmentID field and CopyOfEquipmentDetails opens. I edit fields on main and subform. Did not click Edit button. Why is there an Edit button?
    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.

  7. #7
    ConnorLally is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    12
    Ah, I have just realised that I changed the way in which information is viewed in my database.
    My apologies, that form used to be how I viewed the information and also edit it. but I have a different form to view information on a record now. I will keep that form as always simply an edit form and remove the button.
    My apologies for taking up your time with something I should have realised whilst doing it.
    Thanks for helping bring this to my attention

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

Similar Threads

  1. Double Click current record to Edit
    By projectpupil7 in forum Access
    Replies: 18
    Last Post: 11-25-2014, 01:03 PM
  2. Replies: 5
    Last Post: 11-06-2013, 02:49 PM
  3. Replies: 1
    Last Post: 05-31-2013, 08:53 AM
  4. Replies: 6
    Last Post: 05-18-2013, 12:48 AM
  5. Replies: 13
    Last Post: 12-17-2012, 07:52 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