hi,

i'm making an application where once enter the password user need to press enter only once and receipt will be produce. My code going well but i have a problem here whereby when user enter more than once receipt printed as how many times they press enter.
How can i make enter only once. How can i do that. PLEASE GUIDE !!!!

As I understand your problem, you like to produce report for this you may use either accept button on form and make it

button1.enable = false

after hitting enter and again make it

button1.enable=true

when password change that means you have to use following code on text change evet

button1.enable=true

If you have still any problem post you code so that I can able to modifies your code and help you....

Best Of Luck

hi,

Below is my code actually i don't use any button. What i want is after entering password user need to press ENTER only once. At the moment ENTER can be pressed as many times as user wants and it lead to receipt to be print as many times they pressed enter. How to stop that.

If Not CheckPasswordControl() Then
                If userPwd <> "123" Then
                    userPwd = ""
                    lblPwd.Text = ""
                    lblMessage.Text = GetButtonText("POS.InvalidPassword")
                    blnPwdFromKeyboard = False

                    Else

                  frmMakePayment.PayABill()  ' save record to database once user press enter

                End If
            End If

Your trying this without using any button, then you use one boolean variable assign it true and check when ever user press enter value of variable value is true then produce it and change the value of variable to false

hi,

i dont get you actually. If you dont mine please explain to me using my code what i need to do. Please guide me

hi,

i mistakenly post my code as new thread. Please have a look on it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.