chuanwang: You can try this in form_activate event:
MSFlexGrid1.ColWidth(1) = 500
MSFlexGrid1.ColWidth(2) = 3000.
This time, "1" means first column of grid, "2" means second column, and so on. (The "0"th column is supposed to be a Fixed Column.)
Please try form_activate event to put CCLINT's code.(Assuming that you are using the DBGrid in Bound mode, and the properties of the Data control have already been set at design time.)
You can try these steps for DAO:
1. Populate the Record set (say rs)
2. Check rs.EOF to ensure that atleast one record exists
3. rs.movelast
4. rs.movefirst
5. The rs.recordcount should contain correct record count now.
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.