|
-
Dec 14th, 2001, 10:36 AM
#1
Thread Starter
Junior Member
-
Dec 14th, 2001, 10:40 AM
#2
You didn't state what the problem is?
-
Dec 14th, 2001, 10:46 AM
#3
Thread Starter
Junior Member
It dosen't work. I get an error stationg:
The Microsoft Jet database engine does not recognize <name> as a valid field name or expression. (Error 3070)
I was trying to check the user name first but I need to check the username and password against the database. If a valid user and pass is found I need it to coppy the info from the groupo collumn in the database to a variable named userGroup. I have tried Seek and Find first. I have been trying to get this login to work for days with no sucess. Please help! 
-123
-
Dec 14th, 2001, 10:48 AM
#4
User is a tring field..soooo
Code:
SearchSting = "User = '" & Trim(txtUser.Text) & "'"
-
Dec 14th, 2001, 10:56 AM
#5
Thread Starter
Junior Member
-
Dec 14th, 2001, 11:03 AM
#6
Thread Starter
Junior Member
OK I got the user/pass working all I need now is a was to stor the group
-
Dec 14th, 2001, 11:04 AM
#7
whats the error? Type Mismatch? If so you did this
Code:
SearchSting = "User = '" & Trim(txtUser.Text) & "'" And "Pass ='" & Trim(txtPass.Text) & "'"
change it to this
Code:
SearchSting = "User = '" & Trim(txtUser.Text) & "' And Pass ='" & Trim(txtPass.Text) & "'"
for your other question
just put in your else for when login is correct
userGroup = txtUser.Text
-
Dec 14th, 2001, 11:07 AM
#8
Thread Starter
Junior Member
no I dont need the user name as user group. I need the record contained in the Group collumn of the database to be set to userGroup.
-123
-
Dec 14th, 2001, 11:09 AM
#9
you mean the group for the logged on user?
-
Dec 14th, 2001, 11:14 AM
#10
Thread Starter
Junior Member
Yes. There are three columns in the database User | Pass | Group. When the User puts in a correct username and password then I need the group of that user to be saved to a variable so that I can use it throughout the program. 
-123
-
Dec 14th, 2001, 11:15 AM
#11
ahh
Code:
userGroup = Data1.Recordset("group")
-
Dec 14th, 2001, 11:22 AM
#12
Thread Starter
Junior Member
Thanks allot! My login is finish!
-
Dec 14th, 2001, 11:27 AM
#13
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|