Results 1 to 2 of 2
  1. #1
    Steve1977 is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Location
    Liverpool, UK
    Posts
    4

    Debug/Compile Database


    Hi, this is my first database, and with help from you helpful lot, I'm making good progress.
    My database is seemingly working fine, but when I try to Debug/Compile Database in VBA menu I get the following error

    'Compile Error, method or data member not found'

    and it's higlighting the '.frmCalendarMain' bit (including the fullstop at the start)

    in this piece of code.

    Code:
    Private Sub Form_AfterUpdate()
    Me.frmCalendarMain.Form.Requery
    End Sub
    Now, the help menu says this happens when links or titles are misspelt etc, but 'frmCalendarMain' seems fine and can be opened without problem and the database itself seems to work fine.

    Should I be concerned with this error? (I'll attach a copy of the DB if you want to take a look)

    Many thanks, Steve

    ps. I'm a newbie so excuse the questions, but this is confusing to me because apart from the VBA compile error, in use the calendar subform works and links as it should.

    Most of the code concerning the calender was taken from a calendar database template some kind soul put out on the internet.


    Attached Files Attached Files

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Use
    Me.Requery
    To requery a Main form (I believe it will requery all child objects too)
    and
    Me.frmCalendarMain.Form.Requery
    To requery a subform container that resides in a main form, from a main form's VBA module. In order for this to work, you will need a subform container named "frmCalendarMain" on your main form.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Can't debug a Sub
    By wardw in forum Programming
    Replies: 6
    Last Post: 10-18-2013, 10:03 AM
  2. Replies: 6
    Last Post: 07-23-2013, 09:30 AM
  3. When To Compile A Database
    By Aaron5714 in forum Access
    Replies: 2
    Last Post: 11-27-2012, 06:56 PM
  4. Automatically compile database
    By kevins in forum Programming
    Replies: 10
    Last Post: 08-28-2012, 07:24 AM
  5. Debug
    By gio25 in forum Programming
    Replies: 1
    Last Post: 02-08-2011, 08:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums