Form contents dissapeared

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mlevit
    New Member
    • Jun 2007
    • 30

    Form contents dissapeared

    Hi,

    I've been working on a form in Access using the tab controls. Everything was working fine and then suddenly the next time I checked what the form looks like in the normal view the tab control doesn't appear there anymore. This is the second time this has happened.



    Does anyone know what the problem could be? I haven't touched any of the visibility settings for any part of the page.

    Thanks,

    Marat
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    This is just a guess, as you haven't really given us much information, but if you have AllowAdditions set to No and have no data in your form's underlying table/query, when you switch to Form View controls, including the tabbed controls, will not be visible.

    To avoid this problem, you can


    1. Set AllowAdditions to Yes
    2. Enter a single record in the underlying table/query
    3. Use some code that sets AllowAdditions to Yes until the first record is entered, then sets AllowAdditions to No.
    Here's some code to perform the third option
    Code:
    Private Sub Form_Load()
    If RecordsetClone.RecordCount = 0 Then
      Me.AllowAdditions = True
    Else
      Me.AllowAdditions = False
    End If
    End Sub
    Code:
    Private Sub Form_Current()
    If RecordsetClone.RecordCount = 0 Then
      Me.AllowAdditions = True
    Else
      Me.AllowAdditions = False
    End If
    End Sub
    Welcome to Bytes!

    Linq ;0)>

    Comment

    • nico5038
      Recognized Expert Specialist
      • Nov 2006
      • 3080

      #3
      Select just the tab control (not a page!), e.g. by clicking top right and check the "Visible" property on the Format tab of the properties popup.

      Nic;o)

      Comment

      Working...