home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

VB in Access help

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1695
Discussions: 200,957, Posts: 2,379,508, Members: 246,328
Old October 21st, 2004, 07:39 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Jul 2004
Posts: 11
VB in Access help

Can anyone help me please, i am kinda stuck with Visual Basic but all i want to do is the following,

Have VB check the entries in two fields on the form (username and password) then check these against what is stored in the table (users) and the form after it (member area) which has the data from the table users.

Once it has checked this data i want it to open the new form (login2) if the password AND user name corralate with each other in the form. what i have so far is,

On Error GoTo Err_Command20_Click

Dim stDocName As String
Dim stLinkCriteria As String


stDocName = "login2"
stLinkCriteria = "[User Name]=" & "'" & Me![loginname] & "'"

Dim stlink2 As String

stlink2 = "[Password]=" & "'" & "'" & Me![pass1] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

this is loosely based on what the button wizard put in, but the problem with it is is that if any user name and password is correct it will let you through. If for example bob's user name is put in and freds password it will still grant access, whereas i want it so that it has to be Bob's username and password.

please help, i'd appreciate it.

dan
danlindley is offline   Reply With Quote
Old October 26th, 2004, 08:24 PM     #2 (permalink)
Member
 
Join Date: Sep 2002
Posts: 43
Are you using VBA for ACCESS?
If so I won't be able to help you, but if you are using VB 6 or G8tr with an ADODB or ODBC connection. I may be able to help you.
Lambo is offline   Reply With Quote
Old October 26th, 2004, 08:29 PM     #3 (permalink)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,560
Blog Entries: 7
Looks like it's simply checking the table to see if a certain password or login exists. Are the password and login stored in the same table? If so, you can get the row number for the login name, then check the password against the password in the field for that row. If it's relational (probably isn't), you'll have to do a bit more work that I can't quite remember offhand.


Vass?
Whir is online now   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
trojan horse trouble draboo Security and Privacy Issues 16 August 26th, 2004 06:33 PM
Does Access Runtime require a license? EvilRick Webmastering and Programming 2 August 17th, 2004 12:57 AM
Table documentation ctaylor Webmastering and Programming 3 March 2nd, 2003 10:30 PM
ZA Pro and home network problem jdbic Networking and Internet 4 January 19th, 2003 06:00 PM
How to work out permissions :) otheos Applications and Operating Systems 22 August 1st, 2002 10:21 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2956)
The disrespect of Obama by Russian .. (41)
Wireless Televisions. (12)
CPU fan stops spinning randomly (9)
Regular Build (11)
windows 7 problem (7)
Laptop with wireless problem. (5)
Is the PSU I received dead? (12)
Print spooler problem (15)
windows vista security holes (11)
radeon x850xt platinum & shader.. (6)
Install XP pro and a Vista laptop ?.. (11)
HIS HD5770 graphic card question (15)
Foreign voltage (10)
Recent Discussions
Multiple Restarts Required at Boot (3)
Open With ..... Win7 (1)
Kingston Bluetooth Dongle Driver (0)
webcam (0)
upgrade for hp a6101 (0)
windows vista security holes (11)
Laptop with wireless problem. (5)
Modern Warfare 2: Who Bought It? (64)
tv not turn on-makes clicking sound (2)
CPU fan stops spinning randomly (9)
EVGA 9800 gtx help with finding a goo.. (11)
Regular Build (11)
Help with onclick and buttons (0)
Virus advise (8)
My monitor won't turn on after instal.. (1)
Internet Lost (3)
Dept. of HS: NSA 'Helped' Develop Vis.. (16)
Point and Shoot Camera Suggestions. (4)
Ideal cheap graph card for PC-Gaming? (18)
radeon x850xt platinum & shader 3 (6)
Graphics Card Upgrade Question (4)
For Sale BFG GTX285 OC2 with 10 year .. (3)
How to convert MP3's (4)
Wireless Televisions. (12)
Hp Artist Edition + Matching Bag (0)


All times are GMT -4. The time now is 08:15 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28