General discussion

Locked

VB 6.0 DataGrid

By albri004 ·
Is there any way that you can populate a data grid, and then, if one or more rows are hilighted pull the data from a specific field for use. I need to be able to pull an e-mail address from only one field so that I can use it to send an e-mail to that person. I already have the query written and working, so now I just need to populate the datagrid and pull the one field. Any ideas or sample code would be awesome!!
Thanks,
Kevin

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by albri004 In reply to VB 6.0 DataGrid

Oh yeah, if it matters, I am using a sql server database.

Collapse -

by JackOfAllTech In reply to VB 6.0 DataGrid

OK, let me make sure I go this right.
You have a SQL DB. You're connecting to it from a VB program. Are you creating a recordset or setting the datasource of the grid to the DB?

If all you're interested in is the one field, it would be more efficient to create a recordset from the query and populate either a listbox or a combobox and then have the user select the desired item.

More info please.

Ralph

Collapse -

by JackOfAllTech In reply to

OK, further clarification needed. Is the address contained in ONE field of the DB by itself? Must you display other info also? If so, did you try configuring the listbox for multiple columns?

Ralph

Collapse -

by albri004 In reply to VB 6.0 DataGrid

Yeah, I'm using a recordset and am planning to populate the grid. I have already tried using a listbox, but I run into the problem of pulling only the information I need. Once I put the record in a list, it becomes a really long string that I would have to parse through to get the e-mail address, which is difficult given the dynamic nature of e-mail addresses...but if you can think of a way to do it, let me know...I would actually PREFER a listbox, since I've already got that functionality written.

Thanks,
Kevin

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums