Results 1 to 10 of 10
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Opening Form (2003)

    I've just added another form to an existing database with 2 buttons on it. One opens form1 and one opens form2. The problem is, 1 button opens form1 ok, but the other button opens form2, with form 1 behind it. I've checked the code and everything seems to be ok. I can't understand why it's doing it.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Opening Form (2003)

    We can't either, without knowing the code behind the forms involved.

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening Form (2003)

    Do you have an On_Load or Open event behind Form1 which opens Form2 ?

    or

    It's difficult to see what's happening with the code unless you post it !

  4. #4
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Opening Form (2003)

    I'd forgot to change the 'On Open' event to reflect the correct form, but now I have another related problem. I have security levels in the database, and the user who opens form 1 should be able to open form 2, but no fields appear in the form when they do. The code is the same for both forms with just the form names in the code being different.

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening Form (2003)

    Glad you fixed the first problem, unfortunately I'm not clued up on security.

    I'm sure someone else will pick up on this and help you.

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Opening Form (2003)

    By security levels, do you mean Access User Security, or some other form of security? If the former, that shouldn't control the visibility of controls on the individual form unless there is explicit code running on one of the form events that checks for an explicit UserID or GroupID.
    Wendell

  7. #7
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Opening Form (2003)

    Yes, I meanu User Access levels. The user has access to both forms, but for some reason, one opens up with nothing visible

  8. #8
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Opening Form (2003)

    Is it possible that the objects are set to not be visible by default on the original form, and code running on the Open or the Load event is making them visible, while the second form doesn't contain that code. To really chase it down, you will probably need to post a stripped down version of the database so we can see the code.
    Wendell

  9. #9
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening Form (2003)

    Does form2 have any records when it is opened?

    If there are no records in the recordsource then the form will open up with no controls showing.

    Just a thought.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  10. #10
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Opening Form (2003)

    No, the form had no data in the controls. Now I've entered some data, it's appearing ok. Thanks. That's something I would never have thought of. Thanks again to you all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •