Results 1 to 6 of 6

Thread: Error Message

  1. #1
    Join Date
    Aug 2011
    Location
    Indianapolis, IN, USA
    Posts
    41

    Unanswered: Error Message

    I am getting an error message ( see attachment) when I try to open a form. When I clear the dialog box the form opens as it should. I have seen this error message before but it was always corrected when I set the On Load event drop down box to Event Procedure. I only have one other event on the form and that is an Exit button. I get the same error message when I click it but it doesn’ t proceed after I clear the dialog box. I’m sure it’s something simple but I can’t find it.
    Attached Thumbnails Attached Thumbnails Error Message.png  

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Please post the code of the form module.
    Have a nice day!

  3. #3
    Join Date
    Aug 2011
    Location
    Indianapolis, IN, USA
    Posts
    41
    Code is attached. Later, I created another form with the same code and properties and it worked fine. I guess it's just one of those things that happen from time to time. Thanks for the reply.
    Attached Files Attached Files

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You must properly declare the member variable strWhoOpenedMe:
    Code:
    Dim strWhoOpenedMe As String
    or:
    Code:
    Private strWhoOpenedMe As String
    or:
    Code:
    Public strWhoOpenedMe As String
    Have a nice day!

  5. #5
    Join Date
    Aug 2011
    Location
    Indianapolis, IN, USA
    Posts
    41
    My face is very red. Thanks a million. That's why my breakpoint in the onload event didn't work. When I did the new form, I typed Dim without even thinking about it. I'll put this on my checklist.

  6. #6
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

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