Help with textbox property tag

SinKoh

Registered User.
Local time
Today, 11:09
Joined
Apr 4, 2015
Messages
14
I am working on a database and on one of the forms they have these three fields. Company, First Name, and Last Name. These three fields have cont.tag called Required. The "Required" tag makes all fields with it required before saving through a method I created. I want to make it so that if the company field has text in it that it removes the tag from First Name/Last Name so they are no longer required but still optional to fill out. Any help would be appreciated. Thanks!
 
in the company control after update event put the following

Code:
if nz(me.company,"")="" then
    firstname.tag="Required"
    lastname.tag="Required"
else
    firstname.tag=""
    lastname.tag=""
end if
Suggest you would also want to add this tot the form current event as well
 
Thank you! That worked perfectly.
 

Users who are viewing this thread

Back
Top Bottom