Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiselection of a dbgrid and printing result

Status
Not open for further replies.

LJPhillips

Programmer
Oct 20, 2003
2
GB
Hi,

I would like a user to select several rows of my dbgrid and for the selcted rows to be put into a recorset for printing. I know there is an selectitem and a selectindex property, but I am not sure how to use them. Would using a different type of grid be benefical?


Thanks in advance.

Louisa
 
Hi

I havent tested this but this is what i would use with a MSFlexGrid and an ADO recordset:

rs.AddNew
rs!firstname = MSFlexGrid1.TextMatrix(MSFlexGrid1.RowSel,0)
rs!surname = MSFlexGrid1.TextMatrix(MSFlexGrid1.RowSel,1)
rs.Update

I havent used the DBGrid much so am not sure on that one.

Hope it helps

Si
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top