Extensible Markup Language ( Customized Ribbon)

It seams like again , there is no way out here for adding the macro that run the forms & reports , what I'm trying to say is like below:

If I create a macro that open the sales order form and I call it " RunMyMacro" , then in XML it will look like below:

<button id="RunMyMacro" label="Run My Macro" onAction="MyMacro"/>

Now my question is suppose I have 100 forms in my application , then it means again that all those form must have macros like above if they are to be opened, for example:

(1) We use forms to open parameter queries  and
(2) Data capturing

Unless I'm missing the point here , is there way out to simply use one line command to open forms???????????


Regards

Chris
LVL 3
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScDirectorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fabrice LambertFabrice LambertCommented:
Hi

To my knowledge, you only need one public procedure with the name you supplied in the XML.
And the procedure need to be in a standard module.

As far as openning forms, you have a couple of options available:
Use the openForm command:
docmd.OpenForm "formName", acNormal

Open in new window

Instanciate the form:
Dim frm As Form_frmUserForm
Set frm = new Form_userForm
frm.visible = true

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScDirectorAuthor Commented:
To my knowledge, you only need one public procedure with the name you supplied in the XML.
And the procedure need to be in a standard module.

But how are you going to call it in XML to be opening the required form without specifying  the parameter , please demonstrate how are doing it by using the following :

(1)  Sales Order form
(2)  General Journal form
(3) Payment form.
(4) Receipts form

Regards

Chris
0
Fabrice LambertFabrice LambertCommented:
You can put the form's name in a  string variable, variable's value depend on what you want to achieve.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScDirectorAuthor Commented:
Exactly this what I thought , but I can do that ,and then call from XML on action, right! then what the second & third form?
0
John TsioumprisSoftware & Systems EngineerCommented:
You could create a method that reads the IRibbonControl Id and accordingly load the form you need...maybe you can do the mapping on a table and accordingly load the proper form...
0
Fabrice LambertFabrice LambertCommented:
You'll need to explain use exactly what you want to do. For now, your explanations are way too vague.

Plus, you can have more than one ribbon in the database, and each form can use a specific ribbon.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.