Programming Button On Form

  • Thread starter Thread starter Junior
  • Start date Start date
J

Junior

Good Day!!

I have a continous form, displaying purchase order data for our
organization. There are two fields which I am interested in. One
represents quantity ordered, let's call it [QORD] and the other is
quanity received to date, let's call is [QRTD].

What I would like to do is place a button in the details section of the
form, so that when the user clicks it, the [QORD] field is adjusted to
be made equal to the [QRTD] field.

Is there also a way to include a warning box to pop up when this button
is pressed, which warns the user and allows the option to proceed with
the change, or cancel out?

I really do appreciate any help.

Thanks in advance.

GZ
 
In the On Click Event of your button:
Dim Answer as Integer
Answer = Msgbox "Your warning message here", vbYesNo
If Answer = vbYes Then
Me.QOrd = Me.QRTD
End if
 
Jeff said:
In the On Click Event of your button:
Dim Answer as Integer
Answer = Msgbox "Your warning message here", vbYesNo
If Answer = vbYes Then
Me.QOrd = Me.QRTD
End if


Thanks Jeff!!
Works just fine.

GZ
 
Back
Top