![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am looking for a way to delete the value from either a textbox or combo box by a button on a form and the action to delete applies to the textbox or combo that is focused with the mouse. The delete action is followed by a record refresh, implicating dependent fields become empty or unable (already works) Bart |
#3
| |||
| |||
|
|
The problem here is that when the user clicks the button on your form, the field loses focus (i.e. focus moves to the command button when you click it.) You may be able to use: * * Screen.PreviousControl = Null but several things could go wrong here, e.g.: - there might not be a previous control, - the previous control may not hold data (e.g. another command button) - the previous control may be bound to a required field (so cannot be setto Null.) -- Allen Browne - Microsoft MVP. *Perth, Western Australia Tips for Access users -http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "AA Arens" <bartvandon... (AT) gmail (DOT) com> wrote in message news:2027bec3-22a5-4f3e-aaa8-fb3320cdc277 (AT) i18g2000pro (DOT) googlegroups.com... I am looking for a way to delete the value from either a textbox or combo box by a button on a form and the action to delete applies to the textbox or combo that is focused with the mouse. The delete action is followed by a record refresh, implicating dependent fields become empty or unable (already works) Bart |
#4
| |||
| |||
|
|
The problem here is that when the user clicks the button on your form, the field loses focus (i.e. focus moves to the command button when you click it.) You may be able to use: Screen.PreviousControl = Null but several things could go wrong here, e.g.: - there might not be a previous control, - the previous control may not hold data (e.g. another command button) - the previous control may be bound to a required field (so cannot be set to Null.) "AA Arens" <bartvandon... (AT) gmail (DOT) com> wrote in message news:2027bec3-22a5-4f3e-aaa8-fb3320cdc277 (AT) i18g2000pro (DOT) googlegroups.com... I am looking for a way to delete the value from either a textbox or combo box by a button on a form and the action to delete applies to the textbox or combo that is focused with the mouse. The delete action is followed by a record refresh, implicating dependent fields become empty or unable (already works) Bart |
#5
| |||
| |||
|
|
On Aug 1, 5:08 pm, "Allen Browne" <AllenBro... (AT) SeeSig (DOT) Invalid> wrote: The problem here is that when the user clicks the button on your form, the field loses focus (i.e. focus moves to the command button when you click it.) You may be able to use: Screen.PreviousControl = Null but several things could go wrong here, e.g.: - there might not be a previous control, - the previous control may not hold data (e.g. another command button) - the previous control may be bound to a required field (so cannot be set to Null.) -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users -http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "AA Arens" <bartvandon... (AT) gmail (DOT) com> wrote in message news:2027bec3-22a5-4f3e-aaa8-fb3320cdc277 (AT) i18g2000pro (DOT) googlegroups.com... I am looking for a way to delete the value from either a textbox or combo box by a button on a form and the action to delete applies to the textbox or combo that is focused with the mouse. The delete action is followed by a record refresh, implicating dependent fields become empty or unable (already works) Bart Allen, Based on your input, it's better to have a button beside the field it refers to, so for every field an "erase value" button. What would be the code, I remember such as erase function but I can't find a good sample. Bart |
![]() |
| Thread Tools | |
| Display Modes | |
| |