auto click in acces

Copper Contributor

Hi everyone,


I am trying to create an auto click in acces.
The autoclick is for in a form. The date of today is already automatically entered in the form. But I want to eliminate as many handlings as possible. So I want to create a from in which I scan a barcode with auto enter (with auto enter I mean that after scanning the barcode acces wil automatically select the next box in the form). In this next box the date of today is autofilled. But I want acces to automaticcaly continue to the next box and skip editing options in the date box without the user having to pres enter.


I hope anyone has a solution for this.


Thanks in advance!


Kind regards,
Dimitri

10 Replies

@Dimitri1220 In the After Update event of the textbox that "recieves" the barcode scanning you can do whatever you want...

Just configure your barcode scanner to append an "Enter" after the scanning and via control the other controls.

@Dimitri1220 Well that is one way.  However, if you want to see what character your barcode DOES append then use the _Keypress event of the field.  Then take a look at what the value of the KeyAscii parameter of this event is.  In one of my implementations, for example the result was 9 (tab key) and I was then able to put an If clause in to test for that and then do what I wanted.

@Maria Barnesthank you for your reply!

 

I am sorry for the bad explanation of my question, please allow me to elaborate. So I am trying to create the following form in Acces:

 

acces box registration.JPG

 


As you can see I am trying to create a form in which the delivery date, box numbers and an order number are registered. My problem is, that the registration process has to be very efficient. So I want the following to happen when I open the form: I want today's date to be auto filled and I want the cursor to immediately start in the box number textbox. So that when a worker opens the form, he can start scanning boxes right away.


If you have a solution to make this happen that would be really great!


Kind regards,


Dimitri

 

@tsgiannisThank you for your reply, that is a perfect solution, I now made the form in such a way that I scan the order number at the end. The barcode of the order number has an auto enter, so after scanning the order number a new empty form will appear. That is perfect! 

 

Do you maybe also have a solution for the following: I want to create the form in such a way that the date is auto filled and the cursor skips the date when opening the form. The form Will then look as follows:

 

acces box registration.JPG

 

 

So I want the following to happen when I open the form: I want today's date to be auto filled and I want the cursor to immediately start in the box number textbox. So that when a worker opens the form, he can start scanning boxes right away, without having to do anything with the date.

 

Please let me know if you have any ideas on how to fix this. Thanks a lot for your help already!

 

Kind regards,

 

Dimitri

Just set Default for the Datefield to Date
and your Barcode "order number" to have Focus...
Probably use the OnCurrent Event
Private Sub Form_Current()
Me.OrderNumber.SetFocus
End Sub

@Dimitri1220 Actually you do not need code to set the barcode to have the focus.  Just set the Tab Index to 0 for that field.  The date field could even be one that you set Tab Stop to No for.

@Maria Barnesthanks again for your reply! Could you maybe explain how I can set the tab index to 0 for the date field?

@tsgiannisthanks a lot for your reply! I am actually a beginner with Acces and I am having a hard time understanding what you mean. I tried looking up your suggestion and found out a few things that helped me understand what you are trying to say, but I still dont understand the most of it. I am sorry for having to ask, but could you please explain a little bit more what you mean so that I understand it and can try to build it?

@Dimitri1220 The Tab Index and Tab Stop properties can be set by right clicking on the field (in form design view) and selecting Properties, then going to the Other tab.  A good right up on these fields is available at https://support.office.com/en-us/article/Set-the-tab-order-for-controls-2B37E49B-52D1-4F03-AE33-9E6D... 

perfect, thank you Maria!