Select Option Value

ByHakan
ByHakan Member Posts: 24
edited 2011-07-16 in Entrepreneur Solution
Hi

I have a Type Field in my table its Option
Values Company and Person
I want if user select Person Then Do Nothing but If User select Company ı want take a Message ('Please Select Person')
This My Code

IF LPerson.Type=Company THEN BEGIN
MESSAGE('Please Select A Person');
END ELSE
IF LCompany.Type=Person THEN BEGIN
MESSAGE('Person Selected');
END;

But its not work :( How i can do this?

Comments

  • tanmaykothari
    tanmaykothari Member Posts: 73
    Dear ByHakan

    Try this code

    IF TableName.Type=TableName.Type::Company THEN BEGIN
    MESSAGE('Please Select A Person');
    END ELSE
    IF TableName.Type=TableNAme.Type::Person THEN BEGIN
    MESSAGE('Person Selected');
    END;

    Here TableName is nothing but ur name of the table
  • ByHakan
    ByHakan Member Posts: 24
    Thanks :) I do it now