hello, what code do i use inorder to link a textbox to a list box.


On the log in screen theres a username textbox.

On another form it has a listbox containing names that are allowed to be used.

If someone enters a name that is contained within the listbox then it allows entry. if not then it doesnt.

How can i get my system to do this?

the code i used so far which doesn't work is:

if textbox1.text = listbox3.items = false then
msgbox("Enter Correct Username"
end if

If textbox1.text = listbox3.items = true then
end if

any help will be greatly appreciated


Reverend Jim commented: no effort shown -2

Recommended Answers

All 3 Replies

Judging from your other posts you know very little about Visual Basic. You didn't know what a textbox was even after it was clearly explained and now you have shown that you don't even know the proper syntax of an IF statement. Read a book or two on Visual Basic. Try to learn the basics on your own first.

I thought this website is for help? am i mistaken? perhaps i dont want to read a book, prehaps i just wanted to do everything i could and if i couldnt do it then ill seek help from people who actually know what to. i didnt ask for some jumped up 'Moderator' to stick their nose in and start slagging me off. Sorry for not knowing what a proper syntax of an if statement is, but hey ho, thats why i came on here!

Start with some tutorials. This way you get to learn the correct syntax, and most likely you can answer your own question. That will be much more helpful to you than just providing you with some answers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.