infomania
Programmer
- Oct 27, 2002
- 148
I am creating an application for barcode scanning and I need to increment the box count when a new box is started (we might pack 10 items per box).
I have an unbound form in which the user enters the order number to get started. A subform (linked by [ORDER_NBR]) is bound to a data table. The box number is defaulted to 1 and the user starts scanning (item and quantity). After scanning the quantity, a new record is started. When the box is full, I want the user to click on a 'CLOSE BOX' button. The action desired is:
1. Go to the next record
2. Set Value of BOX_NBR to Max([BOX_NBR])+1 where Forms!Form!Subform![ORDER_NBR]=DataTable![ORDER_NBR]
3. Subsequent data entry would use this box number until the 'CLOSE BOX' button was clicked again. (i.e. the default for BOX_NBR should be Max([BOX_NBR]), conditional on the order number).
I have tried using a macro but I get a #Name? error.
Any help will be appreciated.
I have an unbound form in which the user enters the order number to get started. A subform (linked by [ORDER_NBR]) is bound to a data table. The box number is defaulted to 1 and the user starts scanning (item and quantity). After scanning the quantity, a new record is started. When the box is full, I want the user to click on a 'CLOSE BOX' button. The action desired is:
1. Go to the next record
2. Set Value of BOX_NBR to Max([BOX_NBR])+1 where Forms!Form!Subform![ORDER_NBR]=DataTable![ORDER_NBR]
3. Subsequent data entry would use this box number until the 'CLOSE BOX' button was clicked again. (i.e. the default for BOX_NBR should be Max([BOX_NBR]), conditional on the order number).
I have tried using a macro but I get a #Name? error.
Any help will be appreciated.