delete command

  • Thread starter Thread starter peljo via AccessMonster.com
  • Start date Start date
P

peljo via AccessMonster.com

In my subform, in the AfterUpdate of the field Quantity, i have the folowing
code:

If Me!size > 19 Then
MsgBox " this is a drum. Please choose a drum"
DoCmd.GoToControl "productid"
DoCmd.Beep
Exit Sub
End If
How can i delete any figures a i have entered in the field quantity? For
example i have entered 2,i get the message that i am wrong, but before Exit i
want to delete any figures,in my case 2, from the field Quantity ?
 
What could the code you've posted possibly have to do with the question
you've asked?
In my subform, in the AfterUpdate of the field Quantity, i have the folowing
code:

If Me!size > 19 Then
MsgBox " this is a drum. Please choose a drum"
DoCmd.GoToControl "productid"
DoCmd.Beep
Exit Sub
End If
How can i delete any figures a i have entered in the field quantity? For
example i have entered 2,i get the message that i am wrong, but before Exit i
want to delete any figures,in my case 2, from the field Quantity ?

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
peljo said:
In my subform, in the AfterUpdate of the field Quantity, i have the folowing
code:

If Me!size > 19 Then
MsgBox " this is a drum. Please choose a drum"
DoCmd.GoToControl "productid"
DoCmd.Beep
Exit Sub
End If
How can i delete any figures a i have entered in the field quantity? For
example i have entered 2,i get the message that i am wrong, but before Exit i
want to delete any figures,in my case 2, from the field Quantity ?


Have you tried to set the value to Null?

If Me!size > 19 Then
MsgBox " this is a drum. Please choose a drum"
Me!size = Null
Me.productid.SetFocus
DoCmd.Beep
Exit Sub
End If
 
Back
Top