I have two questions on the same form. The form (SaleMainFrm) has a subform (SalesSub). The records of the subform are entered via a Barcode scanner. I am trying to prevent the user from creating errors by entering things in the wrong places etc. So far, the error trapping that I have done is working, but there are still two things that are causing a problem:
Problem 1:
Once the sale is finished and the user has entered the “amount tendered” the focus automatically goes to a command button (“finish”). The user must then click this button (or press Enter) and the system will finish this transaction and open a new one. When a new sale is opened, the system automatically enters the information on the main form and then waits to receive the barcode in order to enter the record into the subrform. What they continually do, is forget to click the finish button, instead they scan the next barcode. This causes the system to hang for what seems like ages, but I’m sure its only a few seconds – then it goes to to the new form, where they need to scan the barcode agsin. Is there any way that I can set an event on the ‘finish’ command button that will:
Problem 2
Once the new sales form is created it is given an auto-number ID. This ID is used as the SaleID. I would like these numbers to run consequtively without any gaps. If the user decides after a new sales form is created, not to use it, the system will delete this ID on close. Obviously the next time they open the form, the system gives them the next number and there is now a gap in the numbers. I would like to reset the number to (1 + the last one used) . Is there a simple way to do this?
Any help will be appreciated.
Regards
Lizba
Problem 1:
Once the sale is finished and the user has entered the “amount tendered” the focus automatically goes to a command button (“finish”). The user must then click this button (or press Enter) and the system will finish this transaction and open a new one. When a new sale is opened, the system automatically enters the information on the main form and then waits to receive the barcode in order to enter the record into the subrform. What they continually do, is forget to click the finish button, instead they scan the next barcode. This causes the system to hang for what seems like ages, but I’m sure its only a few seconds – then it goes to to the new form, where they need to scan the barcode agsin. Is there any way that I can set an event on the ‘finish’ command button that will:
- Open a new sales form
- Trap the barcode that the user has scanned and insert into the correct field on the new sales form.
Problem 2
Once the new sales form is created it is given an auto-number ID. This ID is used as the SaleID. I would like these numbers to run consequtively without any gaps. If the user decides after a new sales form is created, not to use it, the system will delete this ID on close. Obviously the next time they open the form, the system gives them the next number and there is now a gap in the numbers. I would like to reset the number to (1 + the last one used) . Is there a simple way to do this?
Any help will be appreciated.
Regards
Lizba