cannot use function in access report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kkshansid
    New Member
    • Oct 2008
    • 232

    #1

    cannot use function in access report

    access 2007
    1. i created the report
    2. went to view code option
    3. copy pasted the code of function code on new module

    but when i call the function in report it gives error enter parameter value but even after providing value it prints
    ?error
    i tried to use it in query too just for testing purpose but it also gives error "undefined function convertcurrency toenglish"
    it seems that my report or query cannot connect with module
    i read many tutorials but the problem still exists
    should i have to install visual basic on my system?
    i used many functions in excell but in access it gives above mentioned errors

    kindly help
    thanks in advance
    Last edited by kkshansid; May 26 '12, 10:02 AM. Reason: add
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    I am assuming that you have not altered the A2007 Trust Centre settings from their defaults, which prevent VBA code from running.

    To set Access 2007 to enable VBA code without restriction you need to alter the Trust Centre settings. This is a bit involved as the settings are buried several menus down.

    Click on the multi-coloured Office button at the top left of the Access window, then click the Access Options button on the lower right of the Office menu. Select Trust Centre from the Access Options menu, then click the Trust Center Settings button.

    Click on the Macro Settings option on the trust center's left side menu, then select Enable all macros (the option which is marked 'not recommended; potentially dangerous code can run)'. Click on OK to close the macro options menu, and Ok again to close the Trust Center menu.

    Close and restart the database for the change to take effect.

    -Stewart

    Comment

    Working...