• Efficiency in calling a value (2000 SR3)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Efficiency in calling a value (2000 SR3)

    • This topic has 1 reply, 2 voices, and was last updated 20 years ago.
    Author
    Topic
    #419599

    I have a parameter form which I use to select a value to filter a report. This form used the procedure (rptPhoneBook example) from Access 2000 Developer’s handbook, one of the features of which is that it uses a constant for the report name and calls on the constant to open the report.

    I now have two slightly different reports that I want to be able to use the same form for choosing values and an added field for choosing which report to print. One is for local use and the other with less detail for submission to the regional body. I discovered in the course of working through this that constants (of which I had given little thought previously), are just that, constant and can’t be changed on the fly. I created a workaround by getting rid of the constant and using a function with the same name as the constant to call the report name. This meant I didn’t really have to rewrite anything and only had to create a very simple function.

    So, here’s the question: Is there a more efficient way to do this? I noticed that the function gets called several times in the process. Is there a way to get the name stored for the duration of the various procedures and not called each time the next little procedure is run? It doesn’t seem to slow things down appreciably it’s more a question of is this the best way to do it.

    Viewing 0 reply threads
    Author
    Replies
    • #947969

      The function is very simple, so the overhead of calling it is small, so I don’t think there is any objection to using it.

    Viewing 0 reply threads
    Reply To: Efficiency in calling a value (2000 SR3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: