h u n t 0 Report post Posted April 8, 2006 Hi anyone can help me with making a form.These are the case;I am using Ms. Access XP, and a database for using as a admission database for new students.And using couple table for the base, however I want that when the operator is trying to add a students (add button), a form will came up, and asking for his/her ID and password and Cliking the LOGIN button and lookup for the ID and Password which stored in a "user" table on the database.When the ID and Password 're correct the function for adding students can be processed, but when the ID and Password uncorrect came the pop-up message and is asking the ID and Password Again.That is all need to know, Please help me with this one.RegardsFarhan Share this post Link to post Share on other sites
snutz411 0 Report post Posted April 8, 2006 (edited) Hi anyone can help me with making a form.These are the case;I am using Ms. Access XP, and a database for using as a admission database for new students.And using couple table for the base, however I want that when the operator is trying to add a students (add button), a form will came up, and asking for his/her ID and password and Cliking the LOGIN button and lookup for the ID and Password which stored in a "user" table on the database.When the ID and Password 're correct the function for adding students can be processed, but when the ID and Password uncorrect came the pop-up message and is asking the ID and Password Again.That is all need to know, Please help me with this one.RegardsFarhan This is pretty easy, you'll just need to add a function to the add button on your form. I hope you are familar with basic Visual Basic syntax. I'll help you with the sudo code for this, but this is just a generalized idea of what you need to do. And also, are you familiar with storing SQL results in result sets? if not google that.String sql_checkUser = "SELECT password FROM user_table WHERE username = username"//store this result in a result set//check to see if the result set has ANY valueif (result set != null)//then we have a valid user name and password//process the add user functionelse //result set is null, so the user name and password didn't match//pop up window, to prompt userend if Again this is just a general idea of what you want to do, I haven't coded in VB in a long time so I don't remember the syntax of things exactly, but if you find the code you want to use and put them where I commented lines for them, you should be good to go. Edited April 8, 2006 by snutz411 (see edit history) Share this post Link to post Share on other sites
phduchuy 0 Report post Posted April 10, 2006 Hi anyone can help me with making a form.These are the case;I am using Ms. Access XP, and a database for using as a admission database for new students.And using couple table for the base, however I want that when the operator is trying to add a students (add button), a form will came up, and asking for his/her ID and password and Cliking the LOGIN button and lookup for the ID and Password which stored in a "user" table on the database.When the ID and Password 're correct the function for adding students can be processed, but when the ID and Password uncorrect came the pop-up message and is asking the ID and Password Again.That is all need to know, Please help me with this one.RegardsFarhan i think , you should do it by VB Share this post Link to post Share on other sites