By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,203 Members | 717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,203 IT Pros & Developers. It's quick & easy.

how do i display the company name starting with letter a in textbox

P: 17
i am using dotnet 2003.i am doing my project in vb.net windows application.i have two form in my project.first form is datagrid .In second form label and textboxes are avilable to save the entering values in datagrid of first form through this 2nd form.my problem is,in 2nd form,if i enter letter a in findtextbox and i click find button means,i want to display the values automatically (assyst in companynametextbox,vijay in contactpersontextbox,cbe in addresstextbox)in 2nd form.
for example,
in first form,
there are 4 columns named as companyname,contactperson,address in datagrid.
values are assyst for companynamecolumn,vijay for contactperson column,cbe for address column.now values in datagrid like below
companyname contactperson address
assyst vijay cbe

in 2nd form,there are 4 label and 4 textbox.textbox are named as findtextbox,companynametextbox,contactpersontextbo x,addresstextbox.
my problem is,
in second form,
if i enter letter a in findtextbox and i click find button means,i want to display the values automatically (assyst in companynametextbox,vijay in contactpersontextbox,cbe in addresstextbox)in 2nd form.
during runtime in vb.net windows application.so how i do these.plz help me.
Jun 13 '07 #1
Share this Question
Share on Google+
2 Replies

P: 79
Use the OnChange event of your textbox to select the records starting with that letter(s).
You will have to use the "LIKE" clause in your SQL SELECT statement to get the values starting with a specific value:

SELECT * FROM TableName WHERE CompanyName LIKE 'A%'

NOTE: The wild card character('%' in my example) is different depending on the Database engine used. You'll have to do some research to find the value for your provider if it doesn't work with '%'.
Jun 13 '07 #2

vanc
Expert 100+
P: 211
i am using dotnet 2003.i am doing my project in vb.net windows application.i have two form in my project.first form is datagrid .In second form label and textboxes are avilable to save the entering values in datagrid of first form through this 2nd form.my problem is,in 2nd form,if i enter letter a in findtextbox and i click find button means,i want to display the values automatically (assyst in companynametextbox,vijay in contactpersontextbox,cbe in addresstextbox)in 2nd form.
for example,
in first form,
there are 4 columns named as companyname,contactperson,address in datagrid.
values are assyst for companynamecolumn,vijay for contactperson column,cbe for address column.now values in datagrid like below
companyname contactperson address
assyst vijay cbe

in 2nd form,there are 4 label and 4 textbox.textbox are named as findtextbox,companynametextbox,contactpersontextbo x,addresstextbox.
my problem is,
in second form,
if i enter letter a in findtextbox and i click find button means,i want to display the values automatically (assyst in companynametextbox,vijay in contactpersontextbox,cbe in addresstextbox)in 2nd form.
during runtime in vb.net windows application.so how i do these.plz help me.
In order to pass values between forms, you should look up delegate or attribute option. If you have a database running underneath, you should look up that database, this is much easier way to do this.
Try those ways, if it's still, give me a buzz.

Cheers.
Jun 13 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.