I have a form with a header section and a subform with lines on it. On this form is functionality for the user to hit a specific key to be prompted with a dialog so that they can scan a series of barcodes until they are done (at which point they just hit escape). My problem is that I have found no way to make my form or more importantly the subform refresh after each scan. Here is my code:
(Reader is a dialog window and AddItemByUPC() is a function that adds an item line based on the scanned UPC code)
Reader.OPEN('Waiting for UPC Barcode Scan...\#1###################');
WHILE (TRUE) DO
BEGIN
UPC := '';
Reader.INPUT(1,UPC);
AddItemByUPC(UPC);
COMMIT;
END;
Reader.CLOSE;
The issue here is that I need each item added to the subform lines to appear after it is scanned. Currently, nothing actually refreshes until the user hits escape, and then all of the new lines suddenly appear. I tried changing the code to something like the following too:
WHILE (TRUE) DO
BEGIN
UPC := '';
Reader.OPEN('Waiting for UPC Barcode Scan...\#1###################');
Reader.INPUT(1,UPC);
Reader.CLOSE;
AddItemByUPC(UPC);
COMMIT;
CurrForm.UPDATE;
END;
but that didn't seem to work either. Does anyone have any ideas?
Thad Ryker
I traded my sanity for a railgun
Comments
CurrForm.UPDATE(false);
Regards,
gus
If it was hard to write, it should be hard to understand."
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
..any others?:)
I traded my sanity for a railgun
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I traded my sanity for a railgun
And another solution - include the textbox for entering the code directly on the form where you have the lines and set NextControl to same control. After entering you will have active the same textbox for next imput...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I traded my sanity for a railgun
I traded my sanity for a railgun