Results 1 to 6 of 6
  1. #1
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107

    Datasheet view delete record using a button


    What is the simplest method to add a delete button at the end of each record in a datasheet view?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Can't. But can make a textbox act like a button. Textbox has a Click event.
    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.

  3. #3
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107
    Yes that is a smart idea, I created a textbox with text "X", but unfortunately I am unable to apply any formatting to it.
    I made it bold with font red, but when showing as datasheet all the formatting is gone.
    Any idea?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Probably best can do is set DisplayAsHyperlink property to Always.

    Alternative is to use ContinuousView and arrange controls to look like datasheet.
    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
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107
    Quote Originally Posted by June7 View Post
    Probably best can do is set DisplayAsHyperlink property to Always.

    Alternative is to use ContinuousView and arrange controls to look like datasheet.
    Thank you, that is a nice solution.

    I also tried another thing, I applied conditional formatting on the new textbox, it now looks different from other text boxes.

    I just have one more question, since now i have a delete button for each record, is there a way to hide the record selector from the datasheet?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    You mean the boxes on left side of window? No, not in Datasheet view.

    Clever application of Conditional Formatting.
    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.

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

Similar Threads

  1. Replies: 4
    Last Post: 11-15-2017, 10:44 AM
  2. Replies: 8
    Last Post: 06-25-2014, 08:03 AM
  3. Delete Record from Datasheet
    By CementCarver in forum Programming
    Replies: 9
    Last Post: 09-22-2013, 04:57 PM
  4. How To Add Button on Datasheet View form
    By OneToLearn in forum Forms
    Replies: 3
    Last Post: 04-11-2013, 02:18 PM
  5. Replies: 4
    Last Post: 12-01-2010, 02:42 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