delete button help (1 Viewer)

gheepok

Registered User.
Local time
Today, 19:46
Joined
Aug 29, 2010
Messages
13
i want to create a button that act as pressing the DEL key. Can someone want help i. thanks
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:46
Joined
Aug 30, 2003
Messages
36,118
To delete a record? Have you tried the button wizard?
 

gheepok

Registered User.
Local time
Today, 19:46
Joined
Aug 29, 2010
Messages
13
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.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:46
Joined
Aug 30, 2003
Messages
36,118
Me.TextboxName = Null

or

Me.TextboxName = ""
 

ghudson

Registered User.
Local time
Today, 07:46
Joined
Jun 8, 2002
Messages
6,195
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 = ""
 

gheepok

Registered User.
Local time
Today, 19:46
Joined
Aug 29, 2010
Messages
13
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:

Users who are viewing this thread

Top Bottom