Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 11th, 2004, 11:37 AM
Authorized User
 
Join Date: Sep 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to rhysduk Send a message via Yahoo to rhysduk
Default How do i count the no. of wrong password entries?

Hi!

How do i count the number of times someone enters a wrong password on a login form? I think i have to use public variables but am uncertain of the HOW and the DO I OR DONT I?

PS: Would the code the same in Access 2000?

Regards
Rhys

 
Old October 11th, 2004, 11:58 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

You can use a public variable for this purpose.

You can define the public variable with module (form) scope as below.

option explicit
dim gbliNumLoginAttempts as integer

You have to put this outside any events.

Then you can increment it in each failed login attempt. When its value reaches 3, you can do the required action.
 
Old October 12th, 2004, 03:48 PM
Authorized User
 
Join Date: Sep 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to rhysduk Send a message via Yahoo to rhysduk
Default

Actually,

Dim blabla As Integer doesnt work ... becoz you cant incremement it throughout the entire database. but using

Public blabla As Integer works perfectly.. thx!


 
Old October 12th, 2004, 11:36 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Really. That was a mistake made by me. Sorry.





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL: Count = Count + 1 elayaraja.s XSLT 3 July 18th, 2008 03:21 AM
Automatic Entries on Forms taraj Access VBA 2 June 16th, 2006 07:37 AM
is there any in built function to count page count g.tamilselvan MySQL 1 February 15th, 2006 07:43 AM
Count, sum, count a value, return records CongoGrey Access 1 April 18th, 2005 02:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.