If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Error Message

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-12, 16:36
Harmanj1 Harmanj1 is offline
Registered User
 
Join Date: Aug 2011
Location: Indianapolis, IN, USA
Posts: 36
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
Error Message-error-message.png  
Reply With Quote
  #2 (permalink)  
Old 02-05-12, 05:19
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
Please post the code of the form module.
__________________
Have a nice day!
Reply With Quote
  #3 (permalink)  
Old 02-05-12, 09:32
Harmanj1 Harmanj1 is offline
Registered User
 
Join Date: Aug 2011
Location: Indianapolis, IN, USA
Posts: 36
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
File Type: txt Code from frmDisplayAccount.txt (1.1 KB, 4 views)
Reply With Quote
  #4 (permalink)  
Old 02-05-12, 09:46
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
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!
Reply With Quote
  #5 (permalink)  
Old 02-05-12, 10:29
Harmanj1 Harmanj1 is offline
Registered User
 
Join Date: Aug 2011
Location: Indianapolis, IN, USA
Posts: 36
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.
Reply With Quote
  #6 (permalink)  
Old 02-05-12, 11:48
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
You're welcome!
__________________
Have a nice day!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On