We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,453 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

listbox

I have two different forms. one has a listbox and the other has a masked textbox. the masked textbox is used as a login and i would like the masked textbox to be checked against the listbox items to be able to "gain access" and login

Any ideas?

3
Contributors
2
Replies
3 Hours
Discussion Span
1 Year Ago
Last Updated
3
Views
ng5
Light Poster
42 posts since Dec 2011
Reputation Points: 19
Solved Threads: 0
Skill Endorsements: 0

You can try

If frmOther.ListBox1.Items.Contains(txtMasked.Text) Then
    'login OK
Else
    MsgBox("name not found")
End If

Assuming your other form is called frmOther, etc.

Reverend Jim
Illigitimae non carborundum
Moderator
3,740 posts since Aug 2010
Reputation Points: 585
Solved Threads: 469
Skill Endorsements: 33

you can also use loop in order to check each items of the listbox. to gain access. but jim's solution is i think fast .

Regards

M.Waqas Aslam
Master Poster
760 posts since Aug 2011
Reputation Points: 58
Solved Threads: 126
Skill Endorsements: 2

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0546 seconds using 2.64MB