English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to create a program (in Standard Exe) consists of three forms. The first one is a form for registration, where the user is asked to enter the necessary info's, including the desired username and password, the second is form is for the log-in where you will enter the username and password, and the third one is the main form. My problem is: When the user has inputed the username and password in the registration form, how can i use it as a reference for the second form which is for the log-in?? I mean, how can i passed the variable of the username and password from the register form in to the log-in form, so that i can now proceed to conditional statements whether he/she has inputed them correctly..
Pls, pls pls!! Give me the source code if you know it!!
That's all, and i hope you'll answer it. Thanks!!!

2006-12-18 16:01:41 · 4 answers · asked by bill 2 in Computers & Internet Programming & Design

4 answers

Where you come from?
If you are around in the Philippines and if that was your thesis or project I will refer to you to visit one of Colleges School TIP (Technological Institute of the Philippines, Manila Campus) in Quiapo, Manila near in President’s House (White House in U.S.A.) I am a Former Student on that school.. they allowing to visit outsider just bring your permit from your school..

In the library there’s a THESIS SECTION.. the program that we used is V.B. (Visual Basic), ORACLE AND ETC. u can get some codes regarding REGISTRATION WITH INFORMATION OF THE CLIENT / CUSTOMER and so on… USERNAME & PASSWORD, all you need..

And there’s a possibility to meet our professional in terms of PROGRAMMING, they can help you specially you are outsider..

I hope I help you at this way.. because I understand what is your situation I am graduate of BS-IT on that school.. I can’t help you to give u some codes because I want to help you PERSONALLY so that I can meet your expectation on your program..

Good luck and more power GOD BLESS…

2006-12-18 18:12:35 · answer #1 · answered by -norie- 1 · 0 0

Add a module to your program, this is wher you can place variables, and functions which you can share amoung the other forms and classes.

From the module you can create a global variable like

public g_myPW as string

this variable will be accessable from all forms

OR

Create a Public function which validates the Username and Password

Public IsValidUser( usr as string, pw as string) as Boolean

Have this function query a database with the username and comparethe returned password with the entered pw.

return true if a match false if incorrect

2006-12-18 16:38:26 · answer #2 · answered by MarkG 7 · 0 0

all variables defined in a form are "local" variables for that form.
if you want to use "public" variables (variables that you can use in any form) you need to add a Module to your project.
Any function or variable defined in a module can be used in any form.

usually in a form you define a variable like:

Dim cUsername as String
Dim cPassword as String

to define this same variables as "public" in a Module, you neeed to use something like:

Global cUsername as String
Global cPassword as String

** Dont forget to delete the definition of this variables (command "Dim") from your Form.

2006-12-18 16:43:59 · answer #3 · answered by Anonymous · 0 0

hi,
use the TAG property of form. Before closing the reg. form, set the tag property of login form with username & "|" & password.

Ex:
In frmRegistration form
sub cmdOK_Click()
frmlogin.Tag= txtUser.Text & "|" & txtPass.text
unload me
frm.login.show
end sub

in FrmLogin Form

get the username and password as
username=split(me.Tag,"|")(0)
password=split(me.Tag,"|")(1)

hope this will help you,

2006-12-18 16:33:52 · answer #4 · answered by Govarthanan R S 2 · 0 1

fedest.com, questions and answers