Hi All,
I have the following piece of code on my subfrom datasheet which re-formats the columns and rows either ON CURRENT or ON LOAD of the form:-
Dim Cntl As Control
For Each Cntl In Me.Form.Controls
Cntl.ColumnWidth = -2
Me.RowHeight = 250
Next Cntl
However, I find that if I activate the scroll bars of the subform, the above code does not work and it seems that scroll bars are not part of any form event i.e. ONGOTFOCUS, ONCURRENT etc. Is there some sort of a SCROLL BAR event or any coding that on activation will run this piece of code?
I need this because whenever the datasheet is on view, and a user scrolls down the page, the columns do not format as required unless you click in the datsheet itself (hence the ONCURRENT event).
Regards,
PAUL.
I have the following piece of code on my subfrom datasheet which re-formats the columns and rows either ON CURRENT or ON LOAD of the form:-
Dim Cntl As Control
For Each Cntl In Me.Form.Controls
Cntl.ColumnWidth = -2
Me.RowHeight = 250
Next Cntl
However, I find that if I activate the scroll bars of the subform, the above code does not work and it seems that scroll bars are not part of any form event i.e. ONGOTFOCUS, ONCURRENT etc. Is there some sort of a SCROLL BAR event or any coding that on activation will run this piece of code?
I need this because whenever the datasheet is on view, and a user scrolls down the page, the columns do not format as required unless you click in the datsheet itself (hence the ONCURRENT event).
Regards,
PAUL.