Results 1 to 7 of 7

Thread: How to cal function on one form from another

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    How to cal function on one form from another

    I was wondering if there was a way to call a function on the form of one window from another form on another window?

    Thanks.

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Re: How to cal function on one form from another

    Why not just have the function in a global module, then you can call it from any form within the application.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to cal function on one form from another

    What sort of windows? Same app or different apps?

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: How to cal function on one form from another

    Same application.

    The function that I want to call is the save function i have on the asp button on the form, would I be able to call that function from another form?

    Or if I do create a global module would I be able to refer to fields on the windows form?

  5. #5
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Re: How to cal function on one form from another

    You can create a global "Save" function that accepts a form as a parameter.
    Example
    VB Code:
    1. Public Sub Save(ByVal FormName As Form)
    2.    'Code here
    3. End Sub
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: How to cal function on one form from another

    So from there I can connect to whichever database I need based on the form as well as access all the fields that reside on that form, is that correct?

  7. #7
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: How to cal function on one form from another

    sounds that way
    Magiaus

    If I helped give me some points.

Posting Permissions

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



Click Here to Expand Forum to Full Width