Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007

    Unanswered: Access cannot find Form

    I need to add a new Form to an Access DB developed by others. This form will be used as a Progress reporter. It will have just the one text box which will have a messages inserted at various points in the VBA code, outlining the steps just completed.

    I have prepared this form called frmProgress, and it appears in Access Objects /Forms view along with all the other forms.

    The Design view of this text box indicates that it is "Unbound"

    When I go to VBA Editor, in the LH column in Project Explorer, there is a folder called MS Office Access Class Objects which contains all the forms. However the new frmProgress is not in there!

    When I run code to add a message to the textbox in my new form, there is an error 2450 saying Access can't find the form frmProgress.

    Does anyone please have some suggestions on what I am doing wrong, or have neglected to do? Could it be that it is not really a Form as it is not linked to anything - only has a text box

    I have included an extract of the codes that I am using. frmTransformer is recognised OK as it is shown in the Class Objects folder in Project Explorer.

     Dim frmProgress As Form
        'hide the form frmTransformer
        If FormInvisible Then
            Form_frmTransformer.Visible = False
        End If
        'open progress form
        Forms!frmProgress.Open              <<<<< Error here
        Forms!frmProgress.Visible = True
        Forms!frmProgress.Text2.text = "Hi there"
    Last edited by JillB; 01-14-08 at 23:11.

  2. #2
    Join Date
    Dec 2004
    Madison, WI
    In all the years I've worked with Access, the one thing I've found that they've never fixed (although maybe in 2007) is the refreshing of the forms in the Project Explorer. Try compacting/repairing then closing out of the mdb and getting back in. If that doesn't work, try opening the mdb using the /decompile option. Other than that, I've always just worked around it and haven't used Project Explorer to get to any of the forms/reports/modules.

    Not sure on why your getting the error though and still might recommend opening with the /decompile option. Also make sure you compile the code.
    Last edited by pkstormy; 01-15-08 at 00:40.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Dec 2007
    Thanks Paul. Looks like I found the problem.
    I determined that the Form had no code attached to it. I then made the Form connected to an Event (Form_Open) it then appeared immediatley in the Class Objects folder in Project Explorer, and my VBA code recognised the form.

    many thanks for looking into this problem for me, much appreciated

Posting Permissions

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