Help with textbox property tag (1 Viewer)

SinKoh

Registered User.
Local time
Today, 01:06
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!
 

CJ_London

Super Moderator
Staff member
Local time
Today, 07:06
Joined
Feb 19, 2013
Messages
16,708
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
 

SinKoh

Registered User.
Local time
Today, 01:06
Joined
Apr 4, 2015
Messages
14
Thank you! That worked perfectly.
 

Users who are viewing this thread

Top Bottom