Auto-open different forms selectively

I want to be able to open Form1 when I open my Access application manually (double-clicking it) but Form2 instead when opening it from a scheduled task (to auto-run/schedule a process on Form2 that I also want to be able to run manually after navigating
there from Form1).
When I run Form2 via a button click on Form1, I pass OpenArgs "Manual". The code in Form2 runs automatically if Nz(OpenArgs,"Manual") = "Automatic"; that is , it runs automatically only if OpenArgs tells it to. So far, so good.
Auto-starting Form2 was also easy. I could not just open Form2 directly from a macro because (at least as far as I can tell) there is no OpenArgs option for OpenForm in a macro; however, I just created a macro that uses RunCode to run a function that opens
Form2, passing OpenArgs "Automatic". Then I just pass the macro's name with the /x MacroName command-line argument when opening the application. Again, so far so good.
Except for one thing: the only way I know (besides VBA or a macro) to auto-open a form is to set that as the default form in the current DB options. But then Form1 opens regardless of whether I open the application by double-clicking it or by using the shortcut
that includes the /x MacroName argument. This means that when auto-running the application, Form1 opens as well as Form2. No, it does not hurt anything, but I am trying to keep this as clean as possible.
I tried cancelling Form1's Form_Open event based on the value of a variable set in my auto-run function, but that did nothing to close Form1, so I infer that the default object/event priority in Access causes the form to open, and therefore its Form_Open
event to fire, before the macro calls the function that opens Form2. So now my aforementioned function sets the value of public Boolean variable AutoRun to True before opening Form2, and I check that value on Form1's timer, then close it if AutoRun = True.
And yes, I know I could create another shortcut that opens a different macro, or I could set Form1 to be invisible unless AutoRun = False. But the timer event and those all seem like workarounds. I would like to be just a bit more definite about this and
have Form1 check one time upon opening, or even some way to prevent it opening if the application is opened via my scheduler. That is, it would be great if I could embed a command in my function to tell Form1 not to open even though it is the normal default
form.
"Can't be done" or "you're stuck with what you already tried" are OK answers (if true). This is not critical; it just piqued my curiosity on how I might accomplish this.

Brian,
Command(), a built-in function, is available in VBA modules but cannot be called directly in the Access user interface (for example, a macro or text box control source). As a workaround, you can wrap Command() with a user-defined function created in a standard
module:
Public Function CmdLineArg() As String
    CmdLineArg = Command
End Function
and then call it in the user interface like this:
=CmdLineArg()  [the equals sign is required in some contexts]
The value of Command() remains in memory until the application is closed.  You can view or modify its value in the Access 2013 user interface by navigating to:
File tab > Options > Client Settings > Advanced > Command-line arguments:
or with these VBA methods:
Application.SetOption "Command-Line Arguments", "SomeText"
Application.GetOption("Command-Line Arguments")
Calling Command() directly where necessary would simplify code development and maintenance.

Similar Messages

  • I created a pdf form and then iported it to Forms Central for distribute. It is now loaded to my website and setup so a person clicks on the link to open the form. At this point they then have to go to upper right to open form using a different view. I wo

    I created a pdf form and then imported it to Forms Central for distribute. It is now loaded to my website and setup so a person clicks on the link to open the form. At this point they then have to go to upper right to open form using a different view. I would like the form to open directly in Adobe Reader form to make it easier to enter information. Thanks, Ike

    If you created it in Forms Central, you have to edit it there. I believe Forms Central is similar to LiveCycle Designer in that the form created is no longer able to be edited in Acrobat. I might be wrong, but that is my understanding. You add the submit button in Forms Central. Within Acrobat, you should be able to go to the forms menu and Manage Data to save the data to an Excel file. Others better with forms should be by to clarify things, but this should get you started. In the future you might find it better to post a forms question in the forms discussions.

  • Is it possible to make a fillable form have variable fields - so if you select a radio button it triggers a different form field to be seen depending on which radio button is selected??

    Is it possible to make a fillable form have variable fields - so if you select a radio button it triggers a different form field to be seen depending on which radio button is selected??

    Yes, one needs to use some custom JavaScript code to control the other fields' properties.
    Disabling (graying-out) Form Fields by Thom Parker

  • T-code HRBEN0005 calling different form for open enrollment

    Hi,
    I have to create two different forms for different adjustment reasons for open enrollment(t-code HRBEN0005).
    But in the config table T74HL we can call only one form so I am looking for an enhancement where i can  pass the form name according to the adjustment reason.
    I am not able to find any such enhancement, please let me know if anyone has done this scenario.
    Regards,
    Manu

    Hi,
    As I understand, you have a custom edit form, you would like to click a button and jump to another edit form. Correct me if there is any misunderstanding.
    If that is the case, you could create different view for a list edit form. Then use a button to switch among views to show different view. For more information:
    http://office.microsoft.com/en-in/infopath-help/add-delete-and-switch-views-pages-in-a-form-HA101732801.aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Auto-Create a form number when form is opened.

    Hello,
    I was wondering if I can auto-create a number to populate in sequence every time I open the form?  For example, Microsoft Word, Excel auto populates the date when the form is open.  I'd like the same functionality when creating a form to auto-populate a number counter each time the form is opened.
    Any ideas?

    That depends on how the PDF is being created and served to users.
    If you are simply putting an interactive PDF form on a file share or a web site, you could attach script to a form event to generate a unique id but it will not be a sequential number. To create a sequentially unique id you will have to call a server process which maintains the sequential number through a call to a persistent store (a database, XML file, flat file, etcetera).
    If you are generating the PDF form using LiveCycle (server solution), the server process used for generating the form could call a process as described above.
    Steve

  • Select user action without opening the form

    Environment is:  LiveCycle ES2.5  Turnkey install Express Mode.  Windows, JBoss, MySQL.
                                Browser IE w/ Reader-X.
    At a User Task, it has a few User Actions (such as "Approve", "Reject"),
    how do I allow the user to activate/select one of those actions (while he is in the WorkSpace) without forcing him to open the form?
    I remember those User Actions used to show up in the To-Do list's "card", but somehow I don't see them anymore.
    What do I need to do to get them show up in the "Card" ?
    TIA

    I found it.  It's under the "List" view, not on the "Card"....  I thought it was on the Card in previous version...

  • Open each form in different IE window

    I need a help from you in forms 9i, reg if user select a menu item, i want to open the corresponding form in a new internet explorer window. Now its open the form in already existing ie window. Any Idea ?

    I thinck that you can use web.show_document,with the url of the new form,instead of call_form...

  • If I open a different Forms Central account can I move a form?

    If I open a different Forms Central account can I move a form or export a form from my current one to the new one?

    You can, but you will have to copy the content you want from her computer to iTunes on your computer. To make this easy enable Home Sharing (assuming both computers are on the same local network).

  • Open two Forms  Connecting Two different Data bases simultaneously.

    i am facing a problem for opening two forms in two different SAPB1 applications where it is connecting into two different databases.please send me a solution for this problem.

    Hi Hareen,
    What is your goal to design a form for connecting 2 databases in the same time?
    Thanks,
    Gordon

  • Open two Forms  Connecting Two different Data bases

    In The Same Company Two Different Places Open Same SAPB1 Application Connecting with Two different DataBases,Open both two forms same time.

    Hi Mai,
    you can always open multiple forms in a company.so if you want to open one form from Database 1 and Database 2 , then its okay. If  I did not answer your question correctly, then kindly explain your question in a more detailed way.
    Regards,
    Darius Gragasin

  • How to make a link in a report open a Form in a different region of the same page ?

    Hi,
    I developped a report and a form for the same table. I also created a link and used it in my report so that when I click on the link of one record, the form is opened and display this record.
    My problem is that when I include my report as a portlet and I click on a link, the form is opened in full screen mode by replacing the page containing my report.
    What should I do in order to open this form in another region of the same page ?
    Thanks a lot

    I presume that the two regions are working fine with their individual buttons and your issue is how to make them both save with one button.
    Here is how
    a. You will have 2 ApplyMRU and 1 ApplyMRD processes for each of the regions. Right? Lets say you have 2 "Save" (i.e. label=Save) buttons, one has name SUBMIT and the other SAVE ( SUBMIT and SAVE being the requests that will be sent when they are clicked , respectively)
    b. Make the Display condition on one of the buttons 'Never'. Now it won't show when you run the page. Lets say you made SAVE's conditional Display 'Never'
    c. Go and change the condition on all ApplyMRU and ApplyMRD processes from "When Button Pressed" to "Request is contains in Expression1". In Expression1 enter SUBMIT,SAVERegards

  • Auto-Generate Task Form in Jdeveloper 11.1.1.4.0

    Greetings!
    I am studying SOA Suite from some books like "WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g" and "Getting Started with Oracle SOA Suite 11g R1 – A Hands-On Tutorial". These books say that in order to generate a task form using a human task in Bpel you have to right click the human task and should appear a menu option called "Auto-generate Task Form" however this option doesn't show up in my Jdeveloper. Anybody kwnows why?
    I am using Jdeveloper 11.1.1.4 with SOA Composite Editor     11.1.1.4.0.56.82.
    My platform is Windows 7 Professional 64 bits.
    Any help would be appreciated
    Thanks!
    Ramiro Ortiz

    Hi Ramiro
    In JDeveloper, on left side, in Application Navigator tab, select and double clikck your .task file. On right side, in the central window, you will see that Task Details in different tabs. Like on right side, you will see General, Data like. On right side, at the TOP of the central window, there will be a drop down box. Just click on that drop down box, you should see an option like Create or Generate Form something like that. You select that, and it will open a dialog to select a new Project. There give a new Project Name instead of selecting the existing project. Enter the new project name and it will generate the taskDetails.jsp with all other files in that new project.
    If you do not see this option to auto generate form, in the central window. Since you already created human task, I am assuming you updated your JDeveloper with 2 Plugins from help -> Update menu like for SOA Composite Editor and BPM Editor (BPM Only if you want BPM specific stuff).
    Thanks
    Ravi Jegga

  • How to use same DFF for two different forms with :BLOCK.field reference

    Hi,
    Can anyone suggest how to use the same dff in two different forms by using :BLOCK.field reference.
    Scenario is the same DFF is referenced by two forms, viz. Form-1 & Form-2.
    Form-1 Reference Field is :BLOCK.field name, but the same block is not available in Form-2, which throws an error while opening it.
    Any pointers please.
    Thanks,

    In the environment I currently have access to do not have similar setup.
    Let say you setup the DFF1 default value to $HEADER.customer_name, the name of the DFF is CUSTOMER_NAME, description can be anything.
    In DFF2, default value should be a SQL, where you can reference the DFF1. For example, SELECT DECODE($FLEX.CUSTOMER_NAME, 'ABC', 1, 'DEF', 2, NULL) FROM dual
    In this case, you can reference the DFF1.

  • How to go about multiple inclination with different data selection in Delta

    We have to copy large amount of data ( more than 42lak of recodes) selectivly from on ODS to other ODS. in delata load ( BW 3.5 enverioment)
    I thought of loading data in slices through delta loading with selection condition.
    step 1> Do The initialization with selection condition as for calyear =2001 ( Init without data transfer )
    step 2> Take the delta load .. it will take all delta record with same selection
    step 3> Now I want to do Initialization with selection condition as for calyear =2002
    step 4> take the delta now it will take delta for year 2001 and 2002 both Right ?
    Here what problem I am facing.. while doing 2nd time initialization it prompt me to delete the last  initialization request form scheduler menu.
    if i delete the last request .. will it take the delta  for previous initialization selection  and new initialization selection. ?
    Please advice how to go about multiple inclination with different data selection in delta loading.
    Looking forward your reply.

    Hi,
    step 1> Do The initialization with selection condition as for calyear =2001 ( Init without data transfer )
    step 2> Take the delta load .. it will take all delta record with same selection
    step 3> Now I want to do Initialization with selection condition as for calyear =2002
    step 4> take the delta now it will take delta for year 2001 and 2002 both Right ?
    You are correct with this scenario normally. The message you mentioned normally comes up when you open a infopackage and don't change the selection first or in case you have overlapping selections with an already done init.
    regards
    Siggi

  • Unable to open same form with Multiple logins on Windows IE8

    Hello All,
    We recently upgraded our instance from Jinitiator to Java Plugin Version 1.6 U18.
    After that we are unable to open same form from different logins on a same windows machine.
    the following is scenario.
    1) Login as X user into EBS and open a sales order form. -- Every thing is fine.
    2) On the same machine in another browser window, login as X user again and open Sales order form. --- No issue here also,
    3) On the same machine in another browser window(Keeping the above forms open), login as Y user and open sales order form ---> Form opened from Y user is fine, but, both forms of X user are exiting Oracle applications with message" Your logon session become invalid. Exiting Oracle applications".
    we have encountered issues with opening an attachment from a form, and it is resolved by Unchecking "Enable the next generation java plugin" option in Java control panal --> Advanced -> Java plugin. This workaround done according to note: 290807.1
    But the multiple login issue is not resolved.
    THis isssue is in our PROD and we are loosing customers. Please Advice ASAP.
    THanks.
    Rama Krishna N K J

    Hi Rama;
    It was working before? If yes what have you been changed on your system?(patch etc) You have same error on IE 7 or firefox? Did you check apache log file for more details? You have any FRM error code?
    Please check those settings on your IE8:
    1 - Go to Tools > Internet Options > Security > Select Sites > click on button "Sites": add the url of ebs.
    2 - Go to Tools > Internet Options > Security > Select Sites > Custom Level > Disabled XSS filter.
    Also check:
    Recommended Browsers for Oracle E-Business Suite 11i [ID 285218.1]
    Regard
    Helios

Maybe you are looking for

  • Can't get Email client to work with Network Solutions Email server

    This is a new Email account started after I installed Snow Leopard. The Email server is Network Solutions. I have tried all afternoon and evening trying to set up just one account / mailbox on the Mac and I still haven't gotten it to work. I have bee

  • C40 audio settings keep changing

    I have had this happen 3 times now and its driving me nuts. It occurs about once a month, long enough that nothing is stored in the log files. Some how the Mic 1 & 2 inputs keep getting switched from line level to mic level. After the first time I up

  • Load external swf by .extension and get totalFrames

    What I am trying to achieve is dragging and droping a swf into this app while trace its totalframes. But no luck yet, cant seem to ge the file.extension to be loaded. code so far: package           import flash.display.Sprite;           import flash.

  • Reporting on Max beans ever in cache

    In the Weblogic 5.1 console, for Distributed Objects/EJB/Deployed Beans, on the properties tab there are values for max beans ever in cache and max cache size. Is there some way to access these values through a java class (or some other way) so that

  • Jdeveloper studying materials Launching.

    to get sample files, email [email protected] the stuff that you want may not be listed here, please direct to check more at http://communities.msn.com/ShuSystem&naventryid=107 Contents: sybex ocp books ,free ocp exams oracle9i dba, new features,sqlJ,