Access - call a from sub

  • 17 years ago

    Hi all,
    I am having problems with calling an Access From's Sub or function


    I want to run code that opens one of 6 forms based on a user selected varable from a list box, after the form is open i want to run a public sub in that form and pas variables.


    I have tried:


    strFromName  is dynamically created from users selection


    Forms(strFormName).MySub var1


    and


    currentproject.AllForms(strFormName).MySub var1


    the main goal is to dynamically determin if i need ot find a record and because the opened form is opend from a few places don't want to put it in the Form_Open proc


    Don't want to have to resort to checking global variables every time the forms open.


    any suggestions would be great, thanks

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only two kinds of languages: the ones people complain about and the ones nobody uses” - Bjarne Stroustrup