Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Panic Attack (2000)

    I have been using frmCalendar and basCalendar (from Access 2000 Developer's Handbook Volume:1) for several years. in my applications. For some unkown reason this past Saturday every one of the functions developed a Run Time Error 2452. "The expression you entered has an invalid reference to the Parent Property." When I run the debug if brings me to this Private Function LoadedAsSubForm()
    Dim strName As String
    On Error Resume Next
    ' This action will trigger a runtime
    ' error if the form isn't loaded as a subform.
    strName = Me.Parent.Name
    LoadedAsSubForm = (Err.Number = 0)
    Err.Clear
    End Function
    What in the world would trigger this error after all of this time? I use the call to let end users select a date from the popup Calendar. As you can imagine there is a ton of these scattered through out the networked programs. I need to fix this before Tuesday and the staff comes back on full force. I have added a sample dB that demos how I usually use the function. I need help and quickly.
    Attached Files Attached Files

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

    Re: Panic Attack (2000)

    Please be aware that everyone at Woody's Lounge is a volunteer. I can understand your panic, but you can't demand "help and quickly" (see <!rule=17>Rule 17<!/rule>.)

    Your forms don't cause a problem on my PC. Perhaps there is a reference that is not valid on the PC where you are testing. Activate the Visual Basic Editor, and select Tools | References... If there are references starting with MISSING, note which ones they are, then clear their check boxes and click OK. See if that resolves the problems.

  3. #3
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Panic Attack (2000)

    Point taken. I apoligize that I came off demanding. All of the volunteers at this site have and continue to be a valued resource. That the form didn't cause a runtime error on your PC just underlies my confusion. I have been running this type of form for several years with no problem. And thank you for your quick response.

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

    Re: Panic Attack (2000)

    So is your problem resolved? Did you have a missing reference?
    Wendell

  5. #5
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Panic Attack (2000)

    I could not find any missing references. The situation just does not make any sense. The module and form has worked fine for several years. As far as i can tell nothing on the server or my home PC has changed. The code hangs up when it gets to the "strName = Me.Parent.Name" line. When I take out that line the frmCalendar opens but doesn't open to the current date and will not pass the date to the underlying form. If I can't figure it out I will just have to delete all of those date selector buttons and go back to typing in the dates manually.

  6. #6
    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: Panic Attack (2000)

    Have you recently applied any Service Packs to Windows; Office or Jet?

    If you have Jet SP7 then that could explain your problem - Jet SP7 was a crock!

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

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

    Re: Panic Attack (2000)

    The code using Parent is meant to test whether frmCalendar is opened by itself or as a subform on a main form. Do you need both ways in your database? If you always open frmCalendar by itself, or always as a subform, you don't need the test. so the code could be simplified. But it remains strange that the code worked without problem for years.

    Note: one of the PC's I use has Jet 4.0 SP6, the other one Jet 4.0 SP8. I don't get an error on either one.

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

    Re: Panic Attack (2000)

    I've had a similar problem to this.
    Mine is caused by having VB6 and Access running on the same machine.
    It always happens when trying to use a calendar control.

    The only way I resolve this is to select to repair office !
    All works ok until I use VB again, but this works for me.

  9. #9
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Panic Attack (2000)

    Thank you, that worked fine on my PC. I am contacting my IT people now to do the same on my server. Many Thanks.

  10. #10
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Panic Attack (2000)

    Thanks for your help. I am in a one deep slot in my organization with no tech support or coworkers with enough knowlege to help out when I run into problems. Without support groups like this one I would be in deep **** all of the time.

Posting Permissions

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