Awes
Usually Confused
- Local time
- Today, 15:51
- Joined
- Aug 20, 2002
- Messages
- 34
Hi Everyone
I am trying, not very succesfully, to write a sub-procedure that can be called from a number of forms.
Having read a number of Access Help pages on writing and calling a sub-procedure I can't get it to work, so it is now time to throw it over to you helpful people to point me in the right direction.
According to the help pages I need to create a new module and make it Public, so I have created a module called 'subLogError' with the folowing structure:
Public Sub subLogError (ErrNo, ErrSource)
Dim .......
Statements
.....
.....
Exit Sub
End Sub
In my form I have the following line which should call the sub-procedure:
subLogError ErrNo, ErrSource
The problem that I am having is that when this line of code is reached I get the following error message:
"Expected Variable or Procedure, not Module"
I'm sure that it is just me missing the blindingly obvious but my mind has gone blank on what that could be, so any comments would be gratefully received.
Many thanks
Awes.
I am trying, not very succesfully, to write a sub-procedure that can be called from a number of forms.
Having read a number of Access Help pages on writing and calling a sub-procedure I can't get it to work, so it is now time to throw it over to you helpful people to point me in the right direction.
According to the help pages I need to create a new module and make it Public, so I have created a module called 'subLogError' with the folowing structure:
Public Sub subLogError (ErrNo, ErrSource)
Dim .......
Statements
.....
.....
Exit Sub
End Sub
In my form I have the following line which should call the sub-procedure:
subLogError ErrNo, ErrSource
The problem that I am having is that when this line of code is reached I get the following error message:
"Expected Variable or Procedure, not Module"
I'm sure that it is just me missing the blindingly obvious but my mind has gone blank on what that could be, so any comments would be gratefully received.
Many thanks
Awes.