Connecting Tech Pros Worldwide Help | Site Map

If a field is keyed in, then delete other fields

James G via AccessMonster.com
Guest
 
Posts: n/a
#1: Nov 13 '05
Hi

I have a textbox (Final Flat) that contains a default value of zero. The
other 2 textboxes (Final rate and Final Minimum) always have a numeric value
in them. What i want to do is this......whenever the (Final Flat) is keyed
in, then delete the values in the Final Rate and Final Minimum...........how
would i go about doing this?......thank you!


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200509/1
Larry Linson
Guest
 
Posts: n/a
#2: Nov 13 '05

re: If a field is keyed in, then delete other fields


James G wrote
[color=blue]
> I have a textbox (Final Flat) that contains
> a default value of zero. The other 2 text-
> boxes (Final rate and Final Minimum) always
> have a numeric value in them. What i
> want to do is this......whenever the (Final
> Flat) is keyed in, then delete the values
> in the Final Rate and Final Minimum[/color]

Assuming the Control is bound to a Field in the RecordSource, in the
AfterUpdate event, put code to test for non-zero and to set the other
Controls to zero. If it is unbound, probably the Lost Focus event would be
best.

Larry Linson
Microsoft Access MVP


James G via AccessMonster.com
Guest
 
Posts: n/a
#3: Nov 13 '05

re: If a field is keyed in, then delete other fields


Ok .....this works great.....thank you!....but what if i want to reverse the
process. For instance, what if the person didn't like what they keyed in on
the (Final Flat) and wanted to basically undo what they just did, so the
original values, which were in the (final rate) and (final min) textboxes
before, show up again. How would i go about doin that? thank you!


--
Message posted via http://www.accessmonster.com
Closed Thread