I have a form on which there are two fields I wish to work with.
I am trying to use AfterUpdate to clear the data from FieldB when FieldA is updated.
Can anyone help please
Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.
I have a form on which there are two fields I wish to work with.
I am trying to use AfterUpdate to clear the data from FieldB when FieldA is updated.
Can anyone help please
in the AfterUpdate event use:
Code:if me.fieldA &"" = "" then ' or any other qualifier you may want msgbox "You didn't put anything in FieldA" else me.FieldB = null end if
No, that didn't work. I dont think I explained myself well enough either. The complete story is,
When the field "Medical Date" is updated i wnat the contents of the field ERT Medical to show a Null value.
Thats a better description![]()
to show a null value, or acutally be null??
try to avoid spaces in your fieldnames. it unnecessarily complicates things.Code:if me.[medical Date] & "" = "" then msgbox "Please enter a date." else me.ERT = null 'use if you want to erase the field me.ERT.visible = false 'if you want to hide the field, but not erase the data in it. end if
Works perfectly. Thank you
How do I add to yoru reputation mergatigoerr??????
small star (6 points) under the "SharebThis Comment"
I have found random situations that = Null errors out...
In those situations (if you get any errors) just use = ""
Become Part of This Conversation
Join NowFor Free!
Comments on this post