Problem while using the bar code reader in a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hannoudw
    New Member
    • Aug 2010
    • 115

    Problem while using the bar code reader in a form

    I have a invoice form that works manually ... I tried to use the bar code reader it didn't work well.
    the form contains 12 lines each line is similar of the other one . and contains these unbound text boxes and one combo box.
    first i have a combo box named "type" , after that i have the article.txt , and after that the size.txt , after that i got all the descriptions about the price ...
    typei , articlei , sizei , .... 1 < i < 12
    well when i open the form the cursor is set on the article1.txt ... when i use the bar code to enter the first article ... the article enter correctly without any problem and the cursor is now on article2.txt.
    So now i try to enter another article by the bar code reader ... when i use the dar code... here i discover that the combo box type2.txt has erase from his content , while it must stay equal to R by default (typei.txt = R by default). and to enter the article with the bar code reader now i should reenter the value of type2 (that is R by default) and after that press enter to go to set the focus on article2.txt and then i use the bar code reader a second time and now it worked ... but please does any one know why is that happening ? hope that i made it clear to all ! please reply ... many thanks to you guys
  • RuralGuy
    Recognized Expert Contributor
    • Oct 2006
    • 375

    #2
    Uhh...clear as mud. Here's a link about name that you should *not* use for objects in your db: http://www.allenbrowne.com/AppIssueBadWord.html You have used some. You may want to describe the issue in slightly different terms for us feeble minded readers. ;)

    Comment

    • hannoudw
      New Member
      • Aug 2010
      • 115

      #3
      Actually the field name is From "FromR_S" and not "Type"
      and i didn't get it !!
      these are the names of my fields :
      achat_num , article , size , fact_num , quantite_vendu , prix_vente_unit aire , difference , fromR_S.

      Comment

      • RuralGuy
        Recognized Expert Contributor
        • Oct 2006
        • 375

        #4
        Bar code readers are used on Access applications all of the time. I do not really understand what you are talking about when referring to the ComboBox. Calling a control article.txt confuses me as well. What is the .txt for?

        Comment

        • hannoudw
          New Member
          • Aug 2010
          • 115

          #5
          Oh sorry it's a text box !! :S My mistake ...
          I was reading an article about this problem ....

          Comment

          • RuralGuy
            Recognized Expert Contributor
            • Oct 2006
            • 375

            #6
            Maybe if you posted a zipped up sample of your db it would be clearer as to what is happening.

            Comment

            • hannoudw
              New Member
              • Aug 2010
              • 115

              #7
              well it's so big to upload ... I'll try to describe it ...
              I have an invoice form , my invoice form is composed of 12 lines all text boxes (Unbound text boxes) .
              the thing is when i use the barcode reader to enter the 1st code number (the code number is composed of 2 numbers , the article and the size , code = article concatenate with the size) , but when i want to enter to invoice form , i want to re decompose it into article and size , so first i fill the article , then the size, then all the information about the article will be automatically show in the corresponded combo box (1st price, 2nd price, ...) and after that i did use the Setfocus method to go to the second line and to enter a new code number if i want to . THIS STEP WORK FINE
              Then problem is that when i try to enter a new code the information wont enter properly ... is it because that some scanners are pre-programmed to send a Carriage Return which mimics the operator pressing the "Enter" key on the keyboard ... and that's why the focus is now in the second line and i'm not being able to enter the code using the bar code reader anymore ? And if so how can i fix it?

              Comment

              • RuralGuy
                Recognized Expert Contributor
                • Oct 2006
                • 375

                #8
                Almost *all* scanners can be set to enter a <CR> or not after the scan. At this point I don't know if you need one or not. Can you create a new db and import just this form and whatever associated tables and queries you need? That should be smaller to zip up and upload.

                Comment

                • hannoudw
                  New Member
                  • Aug 2010
                  • 115

                  #9
                  how can i upload an attachment here?

                  Comment

                  • hannoudw
                    New Member
                    • Aug 2010
                    • 115

                    #10
                    Ok here's the invoice form that i'm talking about ! thanks for your help !
                    Attached Files

                    Comment

                    • RuralGuy
                      Recognized Expert Contributor
                      • Oct 2006
                      • 375

                      #11
                      Have you tried to Compile this db? I get an error.

                      Comment

                      • RuralGuy
                        Recognized Expert Contributor
                        • Oct 2006
                        • 375

                        #12
                        I'm not going to work on this until you still have a problem after getting this to compile without errors and upload a fresh copy.

                        Comment

                        • hannoudw
                          New Member
                          • Aug 2010
                          • 115

                          #13
                          Yes i did compile it with no errors ...
                          when you're getting the error? and what's the error?

                          Comment

                          • RuralGuy
                            Recognized Expert Contributor
                            • Oct 2006
                            • 375

                            #14
                            It is this line:
                            Next intCtrlNo
                            in the Private Sub Save_Click() procedure in the Fracture form. It is at least out of place in my copy.

                            Comment

                            • RuralGuy
                              Recognized Expert Contributor
                              • Oct 2006
                              • 375

                              #15
                              The error is "Next without For"

                              Comment

                              Working...