If you want the current contents etc of the grid to print you can use the PrintForm method of the form containing the grid.
If you want to print the contents of the underlying datasource you can set the datasource at the beginning using the MoveFirst method, print the fields you desire, use MoveNext, then loop. For example: and assuming you are using a data control as the recordsource of the datagrid.
data1.MoveFirst
For loops = 1 to data1.recordset.recordcount
print data1.recordset![field1]
'where field1 is the field name
.
.
print data1.recordset![fieldx]
data1.MoveNext
next
note the use of the member access operator "!".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.