rebuild the cod to run in open form

  • Thread starter FlyingDragon via AccessMonster.com
  • Start date
F

FlyingDragon via AccessMonster.com

hi all
can i rebuild this cod to run in open form too

Dim ctrl As Control
If HideControls Then
For Each ctrl In Me.Controls
If ctrl.Tag = "HideThese" Then
ctrl.Visible = False
End If
Next
Else
For Each ctrl In Me.Controls
If ctrl.Tag = "HideThese" Then
ctrl.Visible = True
End If
Next
End If

i try to put it in event OnOpen
bet without result
thanks
 
L

Linq Adams via AccessMonster.com

Why would you want to do that? The code (which actually probably needs to go
into the Form_Load rather than Form_Open) would only apply to the first
record in the recordset. It would not format the other records. Placing it in
the Form_Current event, on the other hand, would format ***all*** records,
including the first one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top