Hi Phuong,
I do not know AX but when using a barcode scanner it is normally a setup option where the scanner returns a string only or a string with a carrage return after it. Look at the setup manual for the scanner you are using - there is normally a barcode printed in the manual, then once scanned will change the setting.