Register Blogs FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

Go Back   DeveloperBarn Forums > Databases > Microsoft Access

Sponsored Links

Discuss "delete button" in the Microsoft Access forum.

Microsoft Access - Microsoft Access is a database for small to medium applications. Learn tips and tricks and best database practices here.


Closed Thread
 
LinkBack Thread Tools Display Modes
  #11  
Old May 21st, 2008, 08:39 AM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 941
Thanks: 22
Thanked 93 Times in 90 Posts
Blog Entries: 5
Rep Power: 4
jmurrayhead is a jewel in the roughjmurrayhead is a jewel in the roughjmurrayhead is a jewel in the roughjmurrayhead is a jewel in the rough

Awards Showcase
Microsoft Windows Microsoft SQL Server Microsoft .Net Classic ASP 
Total Awards: 4

Default

Quote:
Originally Posted by techker View Post
?why is it then it does not work for me??is it the format?
Not sure why it wouldn't work for you. Are you clicking the tiny button to the right of each row? What happens when you click the buttons? When I click them, I get two delete confirmation dialogues and then the row is deleted.
__________________
jmurrayhead
If you agree with me... click the icon!
If my post solved your problem, click the button in the lower right-hand corner of the post.

If you like it here...throw us a few bones to help
support us.

Join our Folding team: DeveloperBarn Folding

Sponsored Links
  #12  
Old May 21st, 2008, 08:40 AM
Barn Newbie
 
Join Date: May 2008
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
techker is an unknown quantity at this point
Default

ok i got it..the anoying security was on..i hade to disable it..

how can i past this in my current project?

i did it but there must be a place to edit the button delete so it can reflect my database?if so what part do i replace?


Code:
Private Sub Command10_Click()
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
  #13  
Old May 21st, 2008, 08:45 AM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 941
Thanks: 22
Thanked 93 Times in 90 Posts
Blog Entries: 5
Rep Power: 4
jmurrayhead is a jewel in the roughjmurrayhead is a jewel in the roughjmurrayhead is a jewel in the roughjmurrayhead is a jewel in the rough

Awards Showcase
Microsoft Windows Microsoft SQL Server Microsoft .Net Classic ASP 
Total Awards: 4

Default

You don't have to replace anything. This procedure uses built-in methods to perform the delete. Simply paste this as your delete button's click event and it should work

Comments on this post
techker agrees: thx for the help
  #14  
Old May 21st, 2008, 08:49 AM
Barn Newbie
 
Join Date: May 2008
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
techker is an unknown quantity at this point
Default

its all good now that stupid security thing..lol!!thx
  #15  
Old May 21st, 2008, 08:56 AM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 941
Thanks: 22
Thanked 93 Times in 90 Posts
Blog Entries: 5
Rep Power: 4
jmurrayhead is a jewel in the roughjmurrayhead is a jewel in the roughjmurrayhead is a jewel in the roughjmurrayhead is a jewel in the rough

Awards Showcase
Microsoft Windows Microsoft SQL Server Microsoft .Net Classic ASP 
Total Awards: 4

Default

Quote:
Originally Posted by techker View Post
its all good now that stupid security thing..lol!!thx
lol - glad your problem is now sorted
Closed Thread

  DeveloperBarn Forums > Databases > Microsoft Access

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Webform Default Button Devwhiz .Net Development 9 May 15th, 2008 01:15 PM
Display Radio Button Value onclick theChris JavaScript Programming 5 March 22nd, 2008 02:28 PM


All times are GMT -4. The time now is 04:16 AM.



Content Relevant URLs by vBSEO 3.2.0