Clear the text of a textbox on a continuous form if another textbox has no data

Sam Summers

Registered User.
Local time
Today, 17:31
Joined
Sep 17, 2001
Messages
939
So far i have tried using vba to do this and but that clears all the rows so then i have been trying to achieve this with conditional formatting but am not getting it right?

I have searched and searched and just can't find out how to do this?

Surely its quite simple really?

Many thanks in advance
 
clearing the textbox will erase all the data in all the records. Is that what you want? (as you described)
but the 1st line says you do NOT want to delete all records. Thats what a continuous form does.
 
clearing the textbox will erase all the data in all the records. Is that what you want? (as you described)
but the 1st line says you do NOT want to delete all records. Thats what a continuous form does.
Is there not a way of doing it using conditional formatting that only affects the row it is in?
 
conditional formatting only colorizes.
if you want to remove data, you need vb:

in the ON CURRENT event:
if isNull(txtBox1) then txtBox2 = ""
 
conditional formatting only colorizes.
if you want to remove data, you need vb:

in the ON CURRENT event:
if isNull(txtBox1) then txtBox2 = ""
Thanks for that. Nothing happened?
It seems a difficult issue? txtbox1 was Null but still the name appeared in txtbox2. Its because there are multiple subforms each displaying a date where the associated UserName is inserted in the row of dates even if one is blank.
Maybe i can hide the textbox if the date textbox (textbox1) isNull?
 
if isNull(txtBox1) then txtBox2 = ""
Actually, the command would be:

if isNull(txtBox1) then txtBox2 =Null

"" = ZLS and is only a valid character for text fields. Date or numeric fields would raise an error.
 

Users who are viewing this thread

Back
Top Bottom