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

    Unanswered: Access does not recognise 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?

    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.

    Code:
     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"
        DoEvents

  2. #2
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    Hi

    Are you using Access Or Excel ??
    there is a folder called MS Office Access Class Objects which contains all the forms. However the new frmProgress is not in there!
    If the form doesn't have a module (ie contain VBA code) it dosn't show in the Objects pain.

    For this
    Forms!frmProgress.Open

    pehapse you should use
    DoCmd.OpenForm "frmProgress"


    ??

    MTB

  3. #3
    Join Date
    Dec 2007
    Posts
    48
    Hi Mike, I added some code ( Sub Form)Open, and sure enough the Form appeared in the Class Objects. Thanks for you help on this.

    kind regards,
    Jill

Posting Permissions

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