Question : can you make scroll bars in a access subform disapear until needed

Hi EE
I have a subform which uses continuous forms. i currently have it set for scroll bars vertical only
However the scroll bar is always present even if the information is ALL viewable on the form.
Can you make it so they are not in view until to many records display so they are required?

Answer : can you make scroll bars in a access subform disapear until needed

I'm still learning Regular Expressions so test this one with a small sample file and check the Immediate window before you uncomment the line that overwrites the original file!

I used these sites to help me develop the RegEx:
http://www.codeproject.com/KB/dotnet/regextutorial.aspx
http://www.regular-expressions.info/

Here's the code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Using ofd As New OpenFileDialog
            If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
                Try
                    Dim txt As String = My.Computer.FileSystem.ReadAllText(ofd.FileName)

                    Debug.Print("Original Text:")
                    Debug.Print("--------------------------------------------------")
                    Debug.Print(txt)
                    Debug.Print("")

                    Dim pattern As String = "(.+)\1{5,}"
                    txt = System.Text.RegularExpressions.Regex.Replace(txt, pattern, "")

                    Debug.Print("Modified Text:")
                    Debug.Print("--------------------------------------------------")
                    Debug.Print(txt)

                    ' Uncomment the line below when you are sure the RegEx is working as desired!
                    ' My.Computer.FileSystem.WriteAllText(ofd.FileName, txt, False)
                Catch ex As Exception
                    MessageBox.Show("File: " & ofd.FileName & vbCrLf & vbCrLf & ex.ToString, "Error Modifying File", MessageBoxButtons.OK, MessageBoxIcon.Error)
                End Try
            End If
        End Using
    End Sub

End Class
Random Solutions  
 
programming4us programming4us