Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-30-2010, 09:35 PM   #1
gheepok
Registered User
 
Join Date: Aug 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
gheepok is on a distinguished road
delete button help

i want to create a button that act as pressing the DEL key. Can someone want help i. thanks

gheepok is offline   Reply With Quote
Old 09-30-2010, 09:48 PM   #2
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 33,120
Thanks: 13
Thanked 4,078 Times in 4,013 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: delete button help

To delete a record? Have you tried the button wizard?
__________________
Paul
Microsoft Access MVP 2007-2019

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is offline   Reply With Quote
Old 09-30-2010, 09:55 PM   #3
gheepok
Registered User
 
Join Date: Aug 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
gheepok is on a distinguished road
Re: delete button help

yes. i have try that. the delete button wizard will delete every data in the current form.
i want a button that can delete a seleted field only.
please help.

gheepok is offline   Reply With Quote
Old 10-01-2010, 06:54 AM   #4
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 33,120
Thanks: 13
Thanked 4,078 Times in 4,013 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: delete button help

Me.TextboxName = Null

or

Me.TextboxName = ""
__________________
Paul
Microsoft Access MVP 2007-2019

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is offline   Reply With Quote
Old 10-01-2010, 06:58 AM   #5
ghudson
Newly Registered User
 
ghudson's Avatar
 
Join Date: Jun 2002
Location: USA
Posts: 6,199
Thanks: 1
Thanked 86 Times in 49 Posts
ghudson has a spectacular aura about ghudson has a spectacular aura about ghudson has a spectacular aura about
Re: delete button help

Quote:
Originally Posted by gheepok View Post
yes. i have try that. the delete button wizard will delete every data in the current form.
i want a button that can delete a seleted field only. please help.
Then you want to delete the value of the field that had the focus before you clicked your delete [Clear] button. This should do it...

Code:
Application.Screen.PreviousControl = ""
__________________
.................................................. ......
Searching this forum or Microsoft.com or MSDN.com or Google is a great way to discover and learn the answers to your Access programming questions.

Well if it seems to be real, it's illusion...

I am using Access 2010 with Windows 7

The
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
function on this forum really does work.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

.................................................. ......
ghudson is offline   Reply With Quote
Old 10-01-2010, 06:24 PM   #6
gheepok
Registered User
 
Join Date: Aug 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
gheepok is on a distinguished road
Re: delete button help

thanks ghudson.
Application.Screen.PreviousControl = "" works.
this works on a main form only.
but how to do this in a main form button that clear a field in a subform.
please help.


Last edited by gheepok; 10-03-2010 at 09:24 PM.
gheepok is offline   Reply With Quote
Reply

Tags
button , delete , vba

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying A Wizard Created Delete Button catbeasy Forms 4 02-25-2009 03:20 PM
How to delete selected record on subform with delete button? smile Forms 9 01-17-2009 06:58 AM
Delete Records Button Disabled stephen81 Forms 2 11-03-2003 08:10 AM
1 button to delete record from 3 tables andrewf10 Forms 4 08-12-2003 02:05 AM
Annoying little quirk with a Button wjoc1 Forms 1 10-31-2002 09:10 AM




All times are GMT -8. The time now is 07:47 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World