Results 1 to 2 of 2

Thread: print data in datagrid

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Posts
    1
    I have a form, a datagrid, and a print button. How can I use code to connect to database to display some fields in a table, and click print button to print the content in the datagrid use the printer. Thanks.

  2. #2
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    To connect to a db you'll need to use a data control, i believe you can either use that of DAO or ADO, and set the RecordSource property of the grid to the name of the data control. At least, this is the easy way. Another way is with code, while having the DataMode property of the grid to 'unbound' but this requires lots coding.

    I am not sure about printing...

    But, if you need to have comprehensive documentation on DBgrid, you can visit www.apexsc.com (maker of DBGrid) to download the "DBGrid Survilval Kit"

    Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width