Results 1 to 8 of 8
  1. #1
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124

    How to refresh listbox after delete a record

    How to refresh listbox after delete a record



    My file: http://www.mediafire.com/?gx52u7393g9ll95

    After double click a record on listbox, will be open new form and click DELETE

    Idon't want to show DELETE on lisbox after delete




    Many thanks

  2. #2
    nhior is offline Novice
    Windows XP Access 2000
    Join Date
    Jul 2011
    Posts
    3
    in the design form...go to properties...select after update (..), put the code me.requery

  3. #3
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124
    It' fine but only processing when click to other record ...

    Please advices

    Many thanks

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    What code do you have in the DoubleClick event of the ListBox?

  5. #5
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124
    Please see below

    Private Sub lstItems_DblClick(Cancel As Integer)
    DoCmd.OpenForm "frmContactDetail"
    End Sub



    Attached file: http://www.mediafire.com/?gx52u7393g9ll95

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Great! Change the code to:
    Code:
    Private Sub lstItems_DblClick(Cancel As Integer)
       DoCmd.OpenForm "frmContactDetail" , , , , , acDialog
       Me.lstItems.Requery
    End Sub

  7. #7
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    124
    or: close and open form again thanks

    Private Sub Delete_Click()
    CurrentDb.Execute "Delete * From tblNames Where RecordID = " & Me.RecordID


    DoCmd.Close acForm, Me.Name
    DoCmd.OpenForm "frmSearchExample"

    End Sub

    How to I can to create next record button in the frmSearchExample form

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    If that is a new issue then please mark this thread as Solved and start a new thread.

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

Similar Threads

  1. Refresh Button creating a new record?
    By mejia.j88 in forum Programming
    Replies: 9
    Last Post: 05-31-2012, 11:27 AM
  2. Delete DB Value from Listbox
    By Fatti in forum Forms
    Replies: 2
    Last Post: 01-14-2012, 06:20 PM
  3. Trying to Delete record using delete query
    By MooseOTL in forum Access
    Replies: 13
    Last Post: 10-04-2011, 02:30 AM
  4. Navigate to a record in a listbox
    By jackkent in forum Access
    Replies: 4
    Last Post: 10-03-2010, 09:36 AM
  5. Refresh All goes back to First Record
    By diane802 in forum Forms
    Replies: 4
    Last Post: 12-30-2009, 04:24 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