Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / March 2005

Tip: Looking for answers? Try searching our database.

ErrorLog Code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
george - 17 Mar 2005 13:12 GMT
Hi

I'm trying to use some code for Error Logging I found in
the February issue of ACCESS ADVISOR.

The writer uses a Public Sub, Admin_ErrorLog_Add, in order
to record error related information in a table. He also
uses a flashing message form, frmAdmin_Message, made by
himself, in order to display error related information to
the user.

He provides a public method named BadNews which sets the
message's content and also sets its TimerInterval. Part of
the code is as follows:

Public Sub BadNews(<parameters>)
<the code goes here>
End Sub

I have put this code as is in a module. In Public Sub
Admin_ErrorLog_Add he calls this method as follows:

'Display frmAdmin_Message so user can see the message:
DoCmd.OpenForm FormName:="frmAdmin_Message"
Call Form_frmAdmin_Message.BadNews(<parameters>)

I have also used this code as is in my module. Well, my
problem is that I am doing something wrong because I get
the message "Form_frmAdmin_Message.BadNews" needs to be
declared.

How can I make BadNews a method of frmAdmin_Message? I
would appreciate any help.

thanks in advance, george
Chaim - 17 Mar 2005 16:59 GMT
Just asking: is the name of your module that contains the sub BadNews named
"Form_frmAdmin_Message"? If BadNews isn't declared there, even though it is
declared Public, VB isn't going to find it. It will look where you tell it to
look by qualifying the procedure name with the module name.

Either move BadNews into Form_frmAdmin_Message or change the module name
qualifier to the name of the module containing BadNews.

> Hi
>
[quoted text clipped - 31 lines]
>
> thanks in advance, george
georg - 17 Mar 2005 19:21 GMT
Chaim
thanks a lot for your help, it works!
george

>-----Original Message-----
>Just asking: is the name of your module that contains the sub BadNews named
[quoted text clipped - 42 lines]
>>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.