Wrox Programmer Forums
|
VB Components Issues specific to components in VB.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 30th, 2005, 09:41 AM
Registered User
 
Join Date: Dec 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGrid

Hi Folks

Need some advice. I am trying to use the DataGrid Click action of a DataGrid control to open up a form and populate textboxes with the details from the specific record that is selected on the DataGrid. The datasource is from an Access 2000 db using an adodc control for connection.
Can anyone help

 
Old January 3rd, 2006, 03:19 PM
Registered User
 
Join Date: Dec 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

As 17 people have viewed this but not replied, can I take it that this cannot be done or have I not supplied enough info. All help greatfully appreciated

 
Old January 3rd, 2006, 06:39 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

because the information is already displayed in the grid, why do you want to show it in another form using text boxes?
Marco
 
Old January 3rd, 2006, 07:59 PM
Registered User
 
Join Date: Dec 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Macrostraf.
The reason I need this funcitonality is that I have a data entry page that I wish to populate with data from various datagrids. ie at txtname I would like the user to type in a name and then click a command button to open a form with a datagrid that shows a list of all users with that name. It will also should other info such as location address telephone no etc. When the user clicks on the correct record from the grid, I would like the information from that record to appear on the original data entry form. It can be done in MS Access but I am not sure how to do this in VB6.

 
Old January 3rd, 2006, 08:24 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

in what part do you need help?

I am giving you some ideas here.

Let's suppose that you have a textBox called txtName and a button called btnName.
Add a new form to your project, called it whatever you want like frmDisplay. In the btnName click event show the frmDisplay form, and pass to it the right query like

"select * from mytable where Name = '" & txtname.text & "'"

and bind the grid to this query

Marco
 
Old January 5th, 2006, 08:53 AM
Registered User
 
Join Date: Dec 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Macrostraf, that has helped.
It is not the solution I was looking for but it has given me a lot of pointers. If I need more help I will post again
Cheers

 
Old February 25th, 2006, 06:28 PM
Registered User
 
Join Date: Feb 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to rbgamer
Default

Here is some help. you need to OleDB to connect to the ms access database. You need to create a dynamic sql statement that will create the sql and write it to the ms Access database. Then attach the grid to the sql statement from the access database.

ICQ me if you need help.

Thank you

rbgamer






Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom paging in Datagrid with datagrid page count madhusrp ASP.NET 1.0 and 1.1 Professional 12 June 2nd, 2008 01:15 PM
User COntrol Datagrid inside datagrid rodmcleay ASP.NET 1.0 and 1.1 Professional 3 April 14th, 2007 10:11 AM
Creating DataGrid In Repeater/DataGrid liduwan ASP.NET 1.0 and 1.1 Professional 9 March 6th, 2007 03:31 PM
datagrid ajaidass ADO.NET 2 March 1st, 2007 05:36 PM
Need help regarding datagrid ngsharmila .NET Framework 1.x 1 February 1st, 2006 12:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.