Closed Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: delete button

  1. #1
    Barn Newbie techker is an unknown quantity at this point techker's Avatar
    Join Date
    May 2008
    Posts
    29
    Rep Power
    4

    delete button

    hey guys i was wondering.i wan't to make a report with a delete button next to it?

    what code to i put?is there any tutorials for this??thx!!

  2. #2
    Barn Enthusiast sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69's Avatar
    Join Date
    Mar 2008
    Location
    The frigid northern plains
    Posts
    432
    Rep Power
    7

    surely you mean form, right? If you meant report, think of the report itself being a piece of paper. What you're asking is, if I draw a delete button on my piece of paper, and I press that drawing with my finger, I want all of the rest of the ink to disappear from the piece of paper.

    Hope that explains things better

  3. #3
    Barn Newbie techker is an unknown quantity at this point techker's Avatar
    Join Date
    May 2008
    Posts
    29
    Rep Power
    4

    lol funny..

    i mean in a report you see the clients with a link to the details. but i wan't next to the client a delete button.

    but i think you mean i can only do it in a form .now the part for me is to make the form show the clients in the database.??

  4. #4
    Barn Enthusiast sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69's Avatar
    Join Date
    Mar 2008
    Location
    The frigid northern plains
    Posts
    432
    Rep Power
    7

    It's as simple as using the query that you made your report with, you would merely change the form to continuous form in the properties. Include a delete button with each record. It's go-home time for me now..... Then off to billiards..... I will work on getting you a sample database to view tomorrow.

  5. #5
    Barn Newbie techker is an unknown quantity at this point techker's Avatar
    Join Date
    May 2008
    Posts
    29
    Rep Power
    4

    thx i will try it out.

  6. #6
    Lightning Master AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123's Avatar
    Join Date
    Mar 2008
    Location
    Fortress Of Solitude
    Posts
    394
    Rep Power
    7

    Another option which i use in my dbs, see below,.

    I like using this as its easy to put in a select case incase the the record is deleted by accident. Just create a command button in your continuous form and paste the code in the onclick event. Feel free to change the MsgBox message to whatever you like.

    Code:
     On Error Resume Next
     Dim intAnswer As Integer
     intAnswer = MsgBox("Are you sure you want to Delete selected Line?", vbOKCancel, "Delete")
     Select Case intAnswer
        Case vbOK
        
         intAnswer = MsgBox("Final Warning - Continue and Delete Line?", vbOKCancel, "Warning! Delete")
             Select Case intAnswer
                 Case vbOK
        
            DoCmd.SetWarnings (warningsoff)        
            DoCmd.RunCommand acCmdSelectRecord
            DoCmd.RunCommand acCmdDeleteRecord
                           
         Case vbCancel
        DoCmd.CancelEvent
            
     End Select
          
        Exit Sub
    
        MsgBox Err.Description
        Resume Next
        
     End Select
    End Sub
    
    Attached Files
    Last edited by AOG123; May 21st, 2008 at 05:54 AM.
    If i helped you, make me famous by clicking the

  7. #7
    Barn Newbie techker is an unknown quantity at this point techker's Avatar
    Join Date
    May 2008
    Posts
    29
    Rep Power
    4

    nice thx!

    hey u was wondering.is it possible to merge to projects together?

    like i made one that i want the same info in another db that im doing.

    same form type.

  8. #8
    Barn Newbie techker is an unknown quantity at this point techker's Avatar
    Join Date
    May 2008
    Posts
    29
    Rep Power
    4

    by the way the delete button does not work in your example?

  9. #9
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    Quote Originally Posted by techker View Post
    by the way the delete button does not work in your example?
    Are you referring to AOG123's example? I just tested it and it works fine for me.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  10. #10
    Barn Newbie techker is an unknown quantity at this point techker's Avatar
    Join Date
    May 2008
    Posts
    29
    Rep Power
    4

    Quote Originally Posted by jmurrayhead View Post
    Are you referring to AOG123's example? I just tested it and it works fine for me.
    ?why is it then it does not work for me??is it the format?

Closed Thread
Page 1 of 2 1 2 LastLast

Similar Threads

  1. Webform Default Button
    By Devwhiz in forum .NET Development
    Replies: 9
    Last Post: May 15th, 2008, 02:15 PM
  2. Display Radio Button Value onclick
    By theChris in forum JavaScript Programming
    Replies: 5
    Last Post: March 22nd, 2008, 03:28 PM

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

SEO by vBSEO