473,320 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

i create a log in.. but everytime i run it error 91 apears and .movefirst highlight

Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  2.  
  3. Public LoginSucceeded As Boolean
  4.  
  5. Private Sub cmdCancel_Click()
  6.     'set the global var to false
  7.     'to denote a failed login
  8.     LoginSucceeded = False
  9.     Me.Hide
  10. End Sub
  11.  
  12. Private Sub cmdOK_Click()
  13. With Adodc1.Recordset
  14.             .MoveFirst
  15.                 Do Until .EOF = True
  16.                     If txtUserName.Text = .Fields("UserName").Value And txtPassword.Text = .Fields("Password").Value Then
  17.                         MsgBox "Login Successful!!!", vbOKOnly + vbInformation, "Security"
  18.                         frmSplash.lblName.Caption = "Welcome " + .Fields("FirstName").Value + " " + .Fields("LastName").Value
  19.                         frmSplash.lblRole.Caption = "You Logged In As " + .Fields("Role").Value + " Enjoy"
  20.                         Unload Me
  21.                         frmSplash.Show
  22.                     Exit Do
  23.                 Else
  24.                     .MoveNext
  25.                     If .EOF = True Then
  26.                         MsgBox "Incorrect Username or Password!!!", vbOKOnly + vbInformation, "Security"
  27.                         txtUserName.Text = ""
  28.                         txtPassword.Text = ""
  29.                         txtUserName.SetFocus
  30.                     End If
  31.                     End If
  32.                 Loop
  33. End With
  34. End Sub
May 30 '13 #1
0 975

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Victor M | last post by:
Hello everyone. I'm running Oracle 8.0 on NT4 (yep thats right) and running SQL*Plus 8.03. I'm typing the following at the SQL*Plus prompt: 1. Create Table EMPLOYEES 2. ( 3. ...
3
by: Robert Hogan | last post by:
Hello, I am attempting to send emails using T-SQL (in a SQLServerAgent Job) using the stored procedure sp_SendSMTPMail. I created the stored proc using the following script that I got off a post...
5
by: Thomas LeBlanc | last post by:
I copied an example from the help: CREATE FUNCTION somefunc() RETURNS integer AS ' DECLARE quantity integer := 30; BEGIN RAISE NOTICE ''Quantity here is %'', quantity; -- Quantity here is 30...
2
by: richard.nicholl | last post by:
Hi, My application is in Delphi 5 with an Access database. I'm trying to populate a TdbGrid pointing to a TTable component. Using a TQuery I create a stored procedure (with a unique name that...
1
by: kathyk | last post by:
Hi, I created an application in MS Access 2000. Since upgrading to MS Access 2003 I have been finding all sorts of strange things. My current problem is with the function below. Ig get an error...
7
by: Munsifali Rashid | last post by:
Hi, I've built a webservice in C# that can add public folders to Exchange. There's also a component built in VB6 which references the Outlook 10 (XP) DLL, so I can change the default form being...
3
by: MLH | last post by:
The error occurred in line #5130. Ideas as to why? qryITSLetterList returns 1 single record - but I don't think that should be a problem. Hmmm??? 5100 Dim MyDB As Database, rstITSLttrs As...
1
by: holliebelle | last post by:
I followed this thread: http://www.thescripts.com/forum/thread97429.html and have an error in IE with the script. No error in Netscape though. Can someone please let me know what my issue...
2
wadro21
by: wadro21 | last post by:
can someone tell me what is wrong with this? Error SQL query: CREATE TABLE uploads( upload_id int( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT , file_name VARCHAR( 30 ) NOT NULL , file_size...
1
by: Fischi | last post by:
Hi, I am getting the error message Script line: 84 Can't create table '.\dwh\f_umsatz.frm' (errno: 150) during execution of the following script on a windows system and mysql 5.0: ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.