• How to call a function from another function

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » How to call a function from another function

    Author
    Topic
    #352061

    How to call a function from another function

    I have a function called Summary, which in its simplest form opens a report.
    what i want is to build another function, defining the Criteria,
    and call this function from the funcion summary
    ——————————-
    Public Function summary()
    DoCmd.OpenReport “R1”, acPreview, , StrCriteria
    End Function
    ——————————————–
    Public Function sizing(Gebinde)
    Dim StrCriteria As String
    If Gebinde = 1 Then
    srtCriteria = StrDrums
    End If
    End Function
    ———————————————–
    Gebinde is a control on a form, and strDrums is a constant

    Viewing 0 reply threads
    Author
    Replies
    • #511013

      Like this:

      DoCmd.OpenReport “R1”, acPreview, , sizing(Gebinde)

      Public Function sizing(Gebinde) as string
      If Gebinde = 1 Then
      sizing = StrDrums
      else
      sizing = “”
      End If
      End Function

      Bart

    Viewing 0 reply threads
    Reply To: How to call a function from another function

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: