looking for help

Staelens30

Registered User.
Local time
Yesterday, 23:58
Joined
Sep 29, 2010
Messages
16
i am looking for the best person out there for a little help and suggestions on a database that i am trying to build
 
I would have to send you my file for you to see what i am refering to i would like to have my form in my database expand when i click on a check box so that it is all compressed when the fields are hidden. if that makes any since
 
You could use something like;
Code:
        If Me.CheckName = True Then
        Me.ControlName1.Visible = False
        Me.ControlName2.Visible = False
        Me.ControlName3.Visible = False
        Me.ControlName4.Visible = False
       [COLOR="SeaGreen"] 'Etc. for all the controls, I'm sure there is a beter way of doing this just can't think of it right at the moment[/COLOR]
        
        InsideHeight = 500 [COLOR="SeaGreen"]'twips is the unit of measurement, adjust these numbers to get the required size[/COLOR]
        InsideWidth = 7870
        Else
        Me.ControlName1.Visible = True
        Me.ControlName2.Visible = True
        Me.ControlName3.Visible = True
        Me.ControlName4.Visible = True
       [COLOR="SeaGreen"] 'Etc. for all the controls, I'm sure there is a beter way of doing this just can't think of it right at the moment[/COLOR]
        
        InsideHeight = 5450 [COLOR="SeaGreen"]'twips is the unit of measurement,adjust these numbers to get the required size[/COLOR]
        InsideWidth = 7870

To find the current size of your form you could put the following on a temporary button;
Code:
MsgBox "InsideHeight = " & InsideHeight & vbCrLf & vbLf & "InsideWidth = " & InsideWidth
 
You can use the following to iterate through all the control in your form and hide them as required;
Code:
Dim ctl As Control

  For Each ctl In Me.Controls
    If InStr(1, ctl.Tag, RegulatoryTypeCode) > 0 OR ctl.Tag = "No Hide" Then
      ctl.Visible = True
    Else 
      ctl.Visible = False
    End If
  Next ctl
Be sure to insert No Hide in the Tag property of your check box, or any other control you do not wish to hide.

To un-hide your controls use the following;
Code:
For Each ctl In Me.Controls
     ctl.Visible = True
Next ctl
 
Dude: Is what I've posted in my previous two posts not what you are looking for :confused:
 

Users who are viewing this thread

Back
Top Bottom