Welcome to Dream.In.Code
Become a VB Expert!

Join 149,911 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,183 people online right now. Registration is fast and FREE... Join Now!




help in login code

 
Reply to this topicStart new topic

help in login code, login code

rfiddiv
18 Dec, 2007 - 07:54 PM
Post #1

New D.I.C Head
*

Joined: 18 Dec, 2007
Posts: 2


My Contributions
could someone help me fix this code....it shows userdata form even if name and password do not match
i need immediate help.....thanks

CODE

Private Sub login_Click()

If adname.Text = Adodc1.Recordset.Fields("Administrator Name").Value And Adodc1.Recordset.Fields("Password").Value = adpassword.Text Then
welcome_ad.Hide
userdata.Show
Exit Sub

Else
userdata.Hide
welcome_ad.Show

End If

End Sub


User is offlineProfile CardPM
+Quote Post

LookNAO
RE: Help In Login Code
28 Dec, 2007 - 11:56 AM
Post #2

D.I.C Head
**

Joined: 28 Dec, 2007
Posts: 66



Thanked: 1 times
My Contributions
You have:
If adname.Text = Adodc1.Recordset.Fields("Administrator Name").Value And Adodc1.Recordset.Fields("Password").Value = adpassword.Text Then


put parenthesis around each logic statement:
If (adname.Text = Adodc1.Recordset.Fields("Administrator Name").Value) And (Adodc1.Recordset.Fields("Password").Value = adpassword.Text) Then

Then it should work....

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 01:57PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month