Hi Marc, I will try to help.
It looks like you are using a subform on a tab control to display your data. The user should be able to drag the border of a column to size it. Have you tried that?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Saddly they seems to be lock and can't be change most be a very simple property that I completly miss
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Hi Marc, I will try to help.
It looks like you are using a subform on a tab control to display your data. The user should be able to drag the border of a column to size it. Have you tried that?
That is a form where my employee list is shown, I would like at run time. To resize but I can't.
Again did you try dragging the borders? Are you running an accde or using the Access Runtime?
If this is truly a listbox (I trust it is) then it would take a fair amount of VBA code to change the Column Widths property based on the the position of the mouse at the moment a mouse down is captured. If you really want to push this, here is basic code to display the position of the mouse over the listbox. I have two text boxes, txtMouseX and txtMouseY.
Private Sub List0_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.txtMouseX = X
Me.txtMouseY = Y
End Sub
As Duane has said, to do this with a list box would require that you write some far from trivial VBA code. It would be far simpler to use a subform in place of the list box. You might like to take a look at FindRecord.zip in my public databases folder at:
https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
This little demo file includes an option to Open simulated 'split form'. In this the subform is by default in continuous forms view, but if you were to change the subform's DefaultView property to Datasheet you would find that you can click and drag the right borders of the columns in the way that Scott has described.
I expect that you could do the same if you were to create a true split form using the built in functionality.