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

What is vbModal

P: 91
Hey People,

I noticed that my previous Developer has used
Expand|Select|Wrap|Line Numbers
  1.  DoCmd.OpenForm "frmPurchaseOrderAssignPO", , , , , acDialog, vbModal
This for opening a from but the last parameter has vbModal as a parameter as openargs

can someone please explain
Sep 20 '12 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 100+
P: 2,321
The parameter passed there is part of the Open args, which is a string variable that can be passed TO the form as it opens.

For instance, I might have a form Projects, in which I have a button to Create New Task, which opens up a seperate form (Instead of using a subform) and I want to let that form know that the new task's master object is the project, so I pass the project ID in the openArgs.

Then in my form's Load event I do:
Expand|Select|Wrap|Line Numbers
  1. Me.tb_ProjectID.DefaultValue=Me.OpenArgs

Now as for vbModal, it really by itself means nothing when passed as part of the openargs, unless you specifically add code in the form using the OpenArgs (As example above)

When something is MODAL it means that it is a popup that catches the focus, I.e. you cannot click on any other access forms, until you have closed the form. Usefull for instance if you don't want your code to proceed until "something" has happened in the popup and user has closed the form. A standard msgbox for instance is modal.

So try checking the form being opened, and do a search in its code for OpenArgs.
Sep 20 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.