By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,779 Members | 1,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,779 IT Pros & Developers. It's quick & easy.

How to use VBA function in Report

P: n/a
Hi,

I wrote a function in VBA, but i'm not sure how to test it to make
sure that my function does what i want it to do.
And how would I call it in Report using the control source? it's
giving me "compile errors" and can i call the function in query?

Thanks. I'd appreciate any help.

Jun 10 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

First, a report has a 'record' source not a 'control' source and I do
not know of a way to run a function in the record source but you can
call a function in a reports events like; On Load. On Activate, On
Close
or you can call a function in a Section event like; On Format

To debug your function you can put a stop on it, while on the vba page
of the report click in the left margin next to a line of code and a
red circle should appear, load the report and when it gets to that
spot it will go into debug mode so you can step thru your lines of
code and see if it is functioning as required. When done click on the
red circle to turn it off.
bobh.

On Jun 9, 10:22 pm, Alice <alicey...@gmail.comwrote:
Hi,

I wrote a function in VBA, but i'm not sure how to test it to make
sure that my function does what i want it to do.
And how would I call it in Report using the control source? it's
giving me "compile errors" and can i call the function in query?

Thanks. I'd appreciate any help.

Jun 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.