I have a subform that is based off a query. What happens is you input a username in a textbox and push a button and a stored procedure is executed and a sub-form displays on screen with the results. This works, until someone hides a few of the columns in the sub-form! The only way I have found to "unhide them" is to highlight the entire sub-form, right click and say unhide.
Is there a way I can use VBA to perform a check that no column is hidden before displaying the sub form to the user? (and of course if the column is hidden display it)
I tried on the subform on load event to do this, but hidden columns remain hidden
Code:Private Sub Form_Load() 'Show any hidden field when the subform loads For Each ctrl In Me.[Form with space subform].Controls If ctrl.ControlType = acTextBox Then ctrl.ColumnHidden = False End If Next End Sub