Results 1 to 4 of 4
  1. #1
    tguckien is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    2

    OpenForm macro

    Hello,



    I´m making a database that controls inventory and am trying to make a macro that opens my DeliveryNoteForm based on a specific OrderID from my OrderForm.

    I tried using the OpenForm action and then the SetValue action. The macro successfully opened the DeliveryNoteForm, but the SetValue action failed. Here is what I inserted for Item and Expression:

    Item: Forms![DeliveryNoteForm]![OrderID]
    Expression: Forms![OrderForm]![OrderID]

    However, after running the macro the error message "Invalid Outside Procedure" appears.


    Any idea what I am doing wrong and how I could go about fixing this problem?? Or, is there another way that I could go about this?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Is this what you're trying to do?

    BaldyWeb wherecondition
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tguckien is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    2

    Invalid Outside Procedure

    That seems like it would work for what I am trying to do, but when I embed it in a macro and run it it says¨"Invalid outside procedure". I´ve tried about every macro I can it seems like to get this to work. Any suggestions??

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    What I posted was VBA code, not a macro. It can be done with a macro, but you'd use the wherecondition argument of OpenForm, not SetValue.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need help with macro
    By abc123 in forum Programming
    Replies: 6
    Last Post: 06-13-2010, 12:34 AM
  2. MACRO help please
    By DianeG in forum Forms
    Replies: 2
    Last Post: 04-20-2010, 07:19 AM
  3. Passing Data with OpenForm
    By nkenney in forum Forms
    Replies: 1
    Last Post: 10-26-2009, 11:40 AM
  4. DoCmd.OpenForm Modification
    By alsoto in forum Forms
    Replies: 6
    Last Post: 05-01-2009, 07:28 AM
  5. OpenForm Action and Arguments
    By nkenney in forum Forms
    Replies: 9
    Last Post: 04-05-2009, 09:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums