function question

  • Thread starter Thread starter JohnE
  • Start date Start date
J

JohnE

I have an embarrassing question. I created a function,
named it, and typed =function() in the AfterUpdate
property of the control. I actually did this 4 times
with 4 functions on several different controls and
properties. None are working. I am getting errors such
as Access cannot find/recognize it.
What am I doing wrong? I am pulling my remaining hair
out as I can not see what (or where) I errored.
Any assistance would help. Thanks.
*** John
 
Where did you place the functions?
Try moving them into a standard module (one that appears on the Module tab
of the Database window).

Make sure they do not have the keyword Private before them. Use Public if
you like, e.g.:
Public Function MyFunc()

If it's still not giving the results you expect, add a Debug.Print at the
top of the function so you know if it is actually running:
Debug.Print "MyFunc() ran at " & Now()
When use use the function, this should show in the Immediate Window
(Ctrl+G).

If that works, press F9 on that line to create a break point.
Execution will pause. Press F8 to step through.
 
Back
Top