Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2004
    Posts
    35

    Unhappy Unanswered: Call sub procedure in another form ???

    I have done this before with no issues ... not sure why this is not working.

    I am trying to run the open sub procedure from another form on the main form.

    Here is the code I am using:
    Forms![form name].form_open

    But the code does not run. This open sub procedure has been set to public:
    Public Sub Form_Open(Cancel As Integer)

    Am I missing something here ???

    Any help is appreciated.

    Cheers!
    QT = )

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    YIKES! Why in the world would you want to do this???? The Open event is issued ONCE when a form is opened ... It is not like the Activate event ... And for that matter, when invoking event methods for another form, that event affects THAT form not the calling form ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Dec 2004
    Posts
    35
    The user is running an estimate for signage. At any time, the user can change the sign from single to double or triple sided. This particular form changes ( ei: hides or disables objects on the form ).

    I need this change to occur upon the change on the main form, where the other form will pop up ( most likely minimized at this point ) ...

    I thought about doubling up the code in the activate event .. I was just trying to avoid that.

    QT

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    I would suggest putting the code in a separate procedure. That way you can call it from any event you want. Other than that it doesn't look like you are passing the required parameter, Cancel. What kind of error are you getting?

  5. #5
    Join Date
    Dec 2004
    Posts
    35
    Ahh , never mind ... I just copied the code into the activate procedure of the form.

    I wasn't recieving any error ... but the form was not changing based on the main form selections.

    Do for now .. I don't like repeating code .. but will leave as is.

    Thanks anyway ...

    QT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •