General discussion

  • Creator
    Topic
  • #2317465

    VB 6.0 DataGrid

    Locked

    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

All Comments

  • Author
    Replies
    • #3379048

      Reply To: VB 6.0 DataGrid

      by albri004 ·

      In reply to VB 6.0 DataGrid

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

    • #3379933

      Reply To: VB 6.0 DataGrid

      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

      • #3378610

        Reply To: VB 6.0 DataGrid

        by jackofalltech ·

        In reply to Reply To: VB 6.0 DataGrid

        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

    • #3379875

      Reply To: VB 6.0 DataGrid

      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

Viewing 2 reply threads