|
-
Mar 29th, 2007, 12:18 AM
#1
Thread Starter
Junior Member
[RESOLVED]welcome form
Hello everybody. actually i want to know how can i createa "welcome" form" which asks the user their name, then says "HELLO Mr./Miss <name>". The user is then given a choice viewing different pictures and accordingly the event takes place as per the optselected. This form should stop by clicking a suitable command button.
plz help..
Last edited by adad; Mar 29th, 2007 at 02:35 AM.
-
Mar 29th, 2007, 12:32 AM
#2
Re: welcome form
vb Code:
Private Sub Command1_Click()
MsgBox "Hello " & Text1
Unload Me
End Sub
-
Mar 29th, 2007, 12:40 AM
#3
Thread Starter
Junior Member
Re: welcome form
hi.. thnx for the rply but i want to know if the person write his / her name then mr/miss is come frst before his/her name and how can the user is then given a choice viewing different pictures and thereby accordingly the event takes place as per the option selected
-
Mar 29th, 2007, 01:05 AM
#4
Lively Member
Re: welcome form
Code:
MsgBox "Hello Mr./Miss " & Text1
assuming text1 is the name of the textbox the user will be inputing to.
-
Mar 29th, 2007, 01:08 AM
#5
Hyperactive Member
Re: welcome form
 Originally Posted by adad
hi.. thnx for the rply but i want to know if the person write his / her name then mr/miss is come frst before his/her name and how can the user is then given a choice viewing different pictures and thereby accordingly the event takes place as per the option selected
If you are wanting to determine the gender of the user based solely on their name, good luck. You would need to create a massive database or reference file with every name and the gender associated with it. Not to mention the thousands of names that are not gender specific. Plus, what if the woman is either a Mrs, Miss, or Ms. Way too many combinations.
You could prompt them to enter a gender and do it that way. Like this:
vb Code:
Private Sub cmdButton_Click()
Dim strName, strGender as String
Dim intGender as Integer
strName = InputBox("Enter your first name")
intGender = "InputBox("Enter 1 for male and 2 for female")
If intGender > 2 then
Msgbox "Incorrect gender number entered"
Exit Sub
End If
If intGender = 1 then
strGender = "Mr."
Elseif intGender = 2 then
strGender = "Mrs."
End If
Msgbox "Welcome " & strGender & " " & strName
Exit Sub
-
Mar 29th, 2007, 02:32 AM
#6
Thread Starter
Junior Member
Re: welcome form
thnx for ur rply..
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
|