Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Retreive values from row in Datagrid

Posted on 2006-04-04
4
Medium Priority
?
171 Views
Last Modified: 2010-05-01
I have one datagrid  and   textboxes namely student name, student Id and student add, student visit date.
\
Now   the user say enters either of the value in text boxes.............
based on that, i am  displaying the search in datagrid...
Now i want that when the user  selects any of the rows from datagrid , the values   will be displayed in the text boxes ( as i have mentioned  above)

 and  at the same  the search results remain in the  datagrid.. since this provides the user that he can select any other rows also......


Please  tell  me  in VB urgently
0
Comment
Question by:rajender123
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:abdulhameeds
ID: 16388955
display thecontent of datagrid values to text box
text1.text= datagrid1.columns(0).text
text2.text= datagrid1.columns(1).text

0
 

Author Comment

by:rajender123
ID: 16390548
Thanks  abdul...
but if th value is null in the datagrid it is showing the Type mismatch error...
how will i  get that value  that this is null/../..
how will i retreive that value..

please let me know
0
 
LVL 4

Accepted Solution

by:
abdulhameeds earned 80 total points
ID: 16393544
ok you can put on error resume next


private sub B1_click ()
on error resume next
text1.text= datagrid1.columns(0).text
text2.text= datagrid1.columns(1).text
end sub
so you can put the error resume on the top of sub
0
 

Author Comment

by:rajender123
ID: 16406374
Thanks my problem is solved now...
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month20 days, 21 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question