"<>" is not working in codeing level

Hi all,

My Code

CompanyRec.RESET;

IF CompanyRec.FIND(’-’) THEN REPEAT
FA.CHANGECOMPANY(CompanyRec.Name);
FA.RESET;
FA.SETRANGE(FA.Barcode,“Barcode Details”.“Barcode Code”);
IF FA.FINDFIRST THEN
BEGIN
IF FA.“FA Location Code” <> “Barcode Details”.“FA Location” THEN BEGIN
FA.INIT;
FA.“FA Location Code” := “Barcode Details”.“FA Location”;
FA.MODIFY;
MESSAGE(‘MODIFIED’);
END;
END;
UNTIL CompanyRec.NEXT=0;

In the above coding “IF FA.“FA Location Code” <> “Barcode Details”.“FA Location” THEN BEGIN” line was not executing.

But if i write FA.“FA Location Code” = “Barcode Details”."FA Location"then it was going through.

Please help me solving this.

Thank U

perhaps you can change to:
IF NOT (FA.“FA Location Code” = “Barcode Details”.“FA Location”) THEN …
and see how’s it going.

I can guarantee you that the operator <> works. Your story sounds like the two location codes are equal, and you have programmed it to only execute all that logic when they are not equal.

You need to debug this and step through the code one line at a time, and keep track of all your variable values. I think you will find that it is doing exactly what you programmed it to do.

please debug your code and check why it is skipping. I thing your code is okay. please check why every time your locations are same