fgets() stops reading data when it encounters a carriage return. If you are looking for more that one line of data then you need to use fread() or put fgets() in a loop that keeps looking for data until there is none. Personally, I user the mscom control for serial communications. It has an event that is always looking for data.
>Hi. VFP7 user
>
>I have written the following program to read barcode scans in from a barcode scanner plugged into my serial port:
>
>RUN mode COM1:9600,N,8,1
>myhandle=FOPEN('COM1')
>mydata=FGETS(myhandle)
>
>Problem: mydata only reports the first line of the scans. My program is obviously not finished...what's next??
>
>Thanks, Randy