calling procedure error message

G

Guest

My database is for conference registration. I have just learned how to write
the code and call the procedure to calculate the registration fee based on 3
variables. Now I want to do the same thing for the preconference fee but it
does not work and I get an error message saying the "afterupdate entered as
the event property setting produced the following error: Scubscript out of
range"

the code begins with:

Function FindPreConfFee(varRegStat As String, varRegDeadline As String, _
varRegPreConf As String) As Integer

If varRegStat = "Member" _
And varRegDeadline = "EB" _
And varRegPreConf = "A" Then
RegPreConfFee = 50
ElseIf varRegStat = "Member" _
And varRegDeadline = "EB" _
And varRegPreConf = "A & B" Then
RegPreConfFee = 100
....
and so on ...

the afterupdate event property setting I used is:

=FindPreConfFee([RegStat],[RegDeadline],[RegPreConf])

Can someone please tell me what I am doing wrong? Your help is appreciated!
 
G

Guest

The error message indicates that Access is interpreting your function call:
=FindPreConfFee([RegStat],[RegDeadline],[RegPreConf])
as an array instead of a function.

If the function is not located in the same form as the place it is called,
such as in a module, then you have t make sure the function is Public so that
your call can find it.

The first line of your function should read:
Pblic Function FindPreConfFee...

Tom Unkefer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top